Configure RDS Collections Using PowerShell

Posted on July 28, 2016 by Russell Smith in Windows Server with 0 Comments

powershell hero

In today’s Ask the Admin, I’ll show you how to configure Remote Desktop Services (RDS) collections using Windows PowerShell.

In Configure RDS Collections in Windows Server 2012 R2, I showed you how to configure collections using Server Manager. RDS collections are groups of RD Session Host servers with a shared set of RemoteApps, session host or VDI desktops that can be published to users. For information on RDS, see Remote Desktop Services Deployment Options in Windows Server 2012 R2 on the Petri IT Knowledgebase.

Create a new collection

To complete the instructions below, log in to the RD Connection Broker using an account that has permission to manage RDS.

Open a PowerShell prompt from the taskbar or Start menu, and then use the New-RDSessionCollection cmdlet to create a new collection. In the example below, I’ve given the collection a name, a description, and specified the RDS Session Host and Connection Broker servers using their fully qualified domain names (FQDNs). In your environment, you will need to replace these values as appropriate.

Create a new Remote Desktop Services (RDS) collection using the New-RDSessionCollection PowerShell cmdlet (Image Credit: Russell Smith)

Create a new Remote Desktop Services (RDS) collection using the New-RDSessionCollection PowerShell cmdlet (Image Credit: Russell Smith)

Sponsored

To verify the creation of the new collection, use the Get-RDSessionCollection cmdlet, replacing srv1.ad.contoso.com with the name of your RDS Connection Broker.

To remove a collection from an RDS Connection Broker, use the Remove-RDSessionCollection cmdlet as shown here, again replacing the values for -CollectionName and -ConnectionBroker as needed for your environment. Once you’ve run the command, you’ll need to confirm the operation by typing Y and pressing ENTER.

Create a collection for RemoteApps

Now let’s create a second collection for a RemoteApp, Wordpad in this example. Because I only have one RDS Session Host in this deployment, it was necessary to delete the previous collection because RDS Session Hosts can only participate in one collection at a time. The New-RDSessionCollection cmdlet below is the same as the one above, apart from the -CollectionName and -CollectionDescription, which are different:

Now we need to add an app to the collection using the New-RDRemoteApp cmdlet:

Add a new RemoteApp to an RDS collection using the New-RDRemoteApp PowerShell cmdlet (Image Credit: Russell Smith)

Add a new RemoteApp to an RDS collection using the New-RDRemoteApp PowerShell cmdlet (Image Credit: Russell Smith)

To see the list of apps in the collection, use the Get-RDRemoteApp cmdlet, replacing the -ConnectionBroker and -CollectionName parameters values for your environment:

Sponsored

To remove an app from a collection, use the Remove-RDRemoteApp cmdlet, and confirm the operation when prompted.

In this article, I showed you how to create, enumerate, and remove collections from RDS Connection Brokers, and how to add and remove RemoteApps to collections.

 

 

Sponsored

Tagged with , ,