Remove-EntraUserManager
移除使用者的管理員。
語法
Default (預設值)
Remove-EntraUserManager
-UserId <String>
[<CommonParameters>]
Description
該Remove-EntraUserManager指令小程式會移除使用者在 Microsoft Entra ID 中的管理員。 在 Microsoft Entra ID 中指定UserId參數以移除使用者的管理員。
範例
範例 1:移除使用者的管理者
Connect-Entra -Scopes 'User.ReadWrite.All'
Remove-EntraUserManager -UserId 'SawyerM@Contoso.com'
這個範例展示了如何移除使用者的管理員。
你可以用 Get-EntraUser Command 取得使用者的資訊。
範例 2:透過管線移除使用者的管理者
Connect-Entra -Scopes 'User.ReadWrite.All'
Get-EntraUser -UserId 'SawyerM@Contoso.com' | Remove-EntraUserManager
這個範例展示了如何移除使用者的管理員。
參數
-UserId
在 Microsoft Entra ID 中指定使用者的 ID(作為使用者主體名稱或 ObjectID)。
參數屬性
| 類型: | System.String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | ObjectId (物件識別碼), UPN, Identity, 使用者主要名稱 (UserPrincipalName) |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。