Set-RdsContext

Sets the tenant group context for subsequent Windows Virtual Desktop cmdlets.

Syntax

Set-RdsContext
   [-TenantGroupName] <String>
   [<CommonParameters>]

Description

The Set-RdsContext cmdlet sets the tenant group context for subsequent RDS PowerShell cmdlets. This context is only valid for the duration of the PowerShell session or until another Set-RdsContext is run. If not specified after running Add-RdsAccount, “Default Tenant Group” will be used.

Examples

Example 1: Set the Windows Virtual Desktop context

PS C:\> Set-RdsContext -TenantGroupName "contosoTenantGroup"

This command sets the context to use the specified tenant group.

Parameters

-TenantGroupName

The name of the tenant group.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.String

Outputs

Microsoft.RDInfra.RDManagementData.RdMgmtContext