Remove-EntraGroupOwner
移除群組中的一位擁有者。
語法
Default (預設值)
Remove-EntraGroupOwner
-OwnerId <String>
-GroupId <String>
[<CommonParameters>]
Description
該Remove-EntraGroupOwner指令小程式會移除 Microsoft Entra ID 群組中的擁有者。 指定 和 GroupIdOwnerId 參數來移除群組中的擁有者。
範例
範例一:移除擁有者
Connect-Entra -Scopes 'Group.ReadWrite.All'
$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'"
$groupOwner = Get-EntraGroup -GroupId $group.Id | Get-EntraGroupOwner | Where-Object {$_.displayName -eq 'Adele Vance'}
Remove-EntraGroupOwner -GroupId $group.Id -OwnerId $groupOwner.Id
此範例示範如何在 Microsoft Entra ID 中移除群組中的擁有者。
GroupId- 指定 Microsoft Entra ID 中群組的 ID。OwnerId- 指定擁有者的身分。
參數
-GroupId
指定 Microsoft Entra ID 中群組的 ID。
參數屬性
| 類型: | System.String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | ObjectId (物件識別碼) |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
-OwnerId
指定擁有者的身分。
參數屬性
| 類型: | System.String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。