Remove-RdsRoleAssignment
删除角色分配。
语法
Remove-RdsRoleAssignment []
Remove-RdsRoleAssignment
[-TenantGroupName <String>]
[-TenantName <String>]
[-HostPoolName <String>]
[-AppGroupName <String>]
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-SignInName <string>
-TenantName <string>
[-AADTenantId <string>]
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-SignInName <string>
-TenantName <string>
-HostPoolName <string>
[-AADTenantId <string>]
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-SignInName <string>
-TenantName <string>
-HostPoolName <string>
-AppGroupName <string>
[-AADTenantId <string>]
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-ApplicationId <string>
-Deployment
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-ApplicationId <string>
-TenantGroupName <string>
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-ApplicationId <string>
-TenantName <string>
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-ApplicationId <string>
-TenantName <string>
-HostPoolName <string>
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <String>
-ApplicationId <String>
[-TenantGroupName <String>]
[-TenantName <String>]
[-HostPoolName <String>]
[-AppGroupName <String>]
[<CommonParameters>]
Remove-RdsRoleAssignment
[-RoleDefinitionName] <string>
-ApplicationId <string>
-TenantName <string>
-HostPoolName <string>
-AppGroupName <string>
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
-RoleDefinitionName <string>
-GroupObjectId <string>
-AADTenantId <string>
-Deployment
[<CommonParameters>]
Remove-RdsRoleAssignment
-RoleDefinitionName <string>
-GroupObjectId <string>
-AADTenantId <string>
-TenantGroupName <string>
[<CommonParameters>]
Remove-RdsRoleAssignment
-RoleDefinitionName <string>
-TenantName <string>
[-GroupObjectId <string>]
[-AADTenantId <string>]
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
-RoleDefinitionName <string>
-TenantName <string>
-HostPoolName <string>
[-GroupObjectId <string>]
[-AADTenantId <string>]
[-TenantGroupName <string>]
[<CommonParameters>]
Remove-RdsRoleAssignment
-RoleDefinitionName <string>
-TenantName <string>
-HostPoolName <string>
-AppGroupName <string>
[-GroupObjectId <string>]
[-AADTenantId <string>]
[-TenantGroupName <string>]
[<CommonParameters>]
说明
Remove-RdsRoleAssignment cmdlet 通过指定角色分配的三个属性来删除角色分配:角色、主体和范围。
若要定义角色,可以使用以下参数之一:
- RDS 所有者
- RDS 参与者
- RDS 读取器
- RDS 运算符
若要指定主体,可以使用以下参数之一:
- SignInName
- ApplicationId
- GroupObjectId
若要定义范围,可以组合使用以下参数:
- TenantGroupName
- TenantName
- HostPoolName
- AppGroupName
示例
示例 1:删除用户的角色分配
PS C:\> Remove-RdsRoleAssignment -RoleDefinitionName "RDS Owner" -SignInName "admin@contoso.com" -TenantGroupName "Default Tenant Group" -TenantName "contoso" -HostPoolName "contosoHostPool" -AppGroupName "Desktop Application Group"
此命令删除在“桌面应用程序组”应用组范围内分配给 RDS 所有者角色的人员的角色分配 admin@contoso.com 。
示例 2:删除服务主体的角色分配
PS C:\> Remove-RdsRoleAssignment -RoleDefinitionName "RDS Reader" -ApplicationId "yyyy-yyyy-yyyy-yyyy-yyyy" -TenantGroupName "contosoTenantGroup" -TenantName "contosoA" -HostPoolName "contosoAHostPool"
此命令删除分配给“contosoAHostPool”主机池范围内 RDS 读取者角色的指定服务主体的角色分配。
示例 3:删除 Azure AD 组的角色分配
PS C:\> Remove-RdsRoleAssignment -RoleDefinitionName "RDS Operator" -GroupObjectId "aaaa-aaaa-aaaa-aaaa-aaaa" -TenantGroupName "contosoTenantGroup" -TenantName "contosoA"
此命令删除分配给“contosoA”租户范围内 RDS 操作员角色的指定 Azure AD 组的角色分配。
参数
-AADTenantId
用户的 Azure Active Directory 租户 ID。 在租户组范围内分配用户时,这是必需的。 如果与 Windows 虚拟桌面租户关联的 Azure AD 租户中不存在用户,则在租户、主机池或应用组范围内分配用户时,也需要这样做。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AppGroupName
应用组的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ApplicationId
服务主体的应用程序 ID。
Type: | String |
Aliases: | SPN, ServicePrincipalName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Deployment
特定于 Windows 虚拟桌面的范围。
Type: | Switch |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GroupObjectId
Azure AD 组的对象 ID。
Type: | String |
Aliases: | UserGroupObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-HostPoolName
主机池的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RoleDefinitionName
角色的名称。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SignInName
用户的用户主体名称 (UPN)。
Type: | String |
Aliases: | Email, UserPrincipalName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TenantGroupName
租户组的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TenantName
租户的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输入
System.String
输出
System.Object