Deploy Personal Session Desktop collection in Windows Server 2016

Deploy Personal Session Desktops with Windows Server 2016 with PowerShell.

John Savill

July 1, 2016

1 Min Read
Deploy Personal Session Desktop collection in Windows Server 2016

Q. How do I deploy a Personal Session Desktop collection in Windows Server 2016?

A. Personal Sessions Desktops are a new type of collection in Windows Server 2016 Remote Desktop Services which consists of a number of Remote Desktop Session Host (RDSH) instances that are assigned in a 1:1 relationship with specific users. The RDSH instances are pre-created and completely managed using PowerShell. Below is example PowerShell that creates a new collection consisting of two RDSH instances and then maps each instance to a specific user. In this example it assumes the connection broker already exists. Note the Personal Session Desktop collection will not display in Server Manager but will be listed in RD Web Access. You should change the RDSH instance names, the users and the connection broker name.

#Define the RDSH instances that will be targets within the Personal Session Host collection$RDSH1 = "savdalrdsh01.savilltech.net"$RDSH2 = "savdalrdsh02.savilltech.net"#Define the users that will be mapped to desktops$User1 = "savilltechjohn"$User2 = "savilltechbond"#Set the target connection broker (that already exists) and collection name$CollectionName = "PDSCollection"$ConnectionBroker = "savdalrds16.savilltech.net"#Add the RDSH instances to the connection brokerAdd-RDServer -Server $RDSH1 -Role "RDS-RD-Server" -ConnectionBroker $ConnectionBroker Add-RDServer -Server $RDSH2 -Role "RDS-RD-Server" -ConnectionBroker $ConnectionBroker #Create the new collectionNew-RDSessionCollection -CollectionName $CollectionName -ConnectionBroker $ConnectionBroker `    -SessionHost $RDSH1,$RDSH2 -PersonalUnmanaged -GrantAdministrativePrivilege #Map the users to RDSH instancesSet-RDPersonalSessionDesktopAssignment -CollectionName $CollectionName `    -ConnectionBroker $ConnectionBroker -User $User1 -Name $RDSH1 Set-RDPersonalSessionDesktopAssignment -CollectionName $CollectionName `    -ConnectionBroker $ConnectionBroker -User $User2 -Name $RDSH2 Get-RDPersonalSessionDesktopAssignment -CollectionName $CollectionName 

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like