Edit

Share via


Add-RdsAppGroupUser

Assigns a user to access an app group.

Syntax

Default (Default)

Add-RdsAppGroupUser
    [-TenantName] <String>
    [-HostPoolName] <String>
    [-AppGroupName] <String>
    [-UserPrincipalName] <String>
    [<CommonParameters>]

Description

The Add-RdsAppGroupUser cmdlet assigns a user to access the specified app group. This cmdlet only takes in a single user principal name (UPN) at a time and only applies to users (not groups). To add multiple users at a time, you can use loop PowerShell syntax. This cmdlet does not support groups as UPNs.

The UPN must exist in the Azure Active Directory associated with the tenant. If the user has already been assigned access to the app group, the cmdlet will succeed silently.

Examples

Example 1

PS C:\> Add-RdsAppGroupUser -TenantName "contoso" -HostPoolName "contosoHostPool" -AppGroupName "Desktop Application Group" -UserPrincipalName "user1@contoso.com"

This command adds the user to the list of users who can access the desktop application group.

Parameters

-AppGroupName

The name of the app group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-HostPoolName

The name of the host pool.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-TenantName

The name of the tenant.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-UserPrincipalName

The user principal name (UPN) of the user you would like to assign access to an app group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

Outputs

Microsoft.RDInfra.RDManagementData.RdMgmtUser