你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Remove-MsolScopedRoleMember
从管理单元范围角色中删除用户。
语法
Remove-MsolScopedRoleMember
-RoleObjectId <Guid>
-AdministrativeUnitObjectId <Guid>
[-RoleMemberObjectId <Guid>]
[-RoleMemberUserPrincipalName <String>]
[-TenantId <Guid>]
[<CommonParameters>]
说明
Remove-MsolScopedRoleMember cmdlet 从管理单元范围角色中删除用户。
示例
示例 1:从管理单元范围角色中删除成员
PS C:\> $WestCoastAu = Get-MsolAdministrativeUnit -SearchString "West Coast"
PS C:\> $UaAdmin = Get-MsolRole -RoleName "User Account Administrator"
PS C:\> $Admin01 = Get-MsolUser -UserPrincipalName "elisadaugherty@contoso.com"
PS C:\> Remove-MsolScopedRoleMember -RoleObjectId $UaAdmin.ObjectId -AdministrativeUnitObjectId $WestCoastAu.ObjectId -RoleMemberObjectId $Admin01.ObjectId
该示例从名为 West Coast 的管理单元范围的用户帐户管理员角色中删除 elisadaugherty@contoso.com 。 在此示例之后,用户不再是角色的成员。
参数
-AdministrativeUnitObjectId
指定管理单元的唯一对象 ID。
类型: | Guid |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-RoleMemberObjectId
指定要从作用域为管理单元的角色中删除的成员的唯一对象 ID。 指定 RoleMemberUserPrincipalName 或 RoleMemberObjectId 参数。
类型: | Guid |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-RoleMemberUserPrincipalName
指定要删除的成员的用户主体名称。 指定 RoleMemberUserPrincipalName 或 RoleMemberObjectId。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-RoleObjectId
指定要从中删除成员的角色的唯一对象 ID。
类型: | Guid |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-TenantId
指定要对其执行操作的租户的唯一 ID。 默认值为当前用户的租户。 此参数仅适用于合作伙伴用户。
类型: | Guid |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |