Hello AskPerf Readers! Dhiraj here from the Windows Performance team to talk about deploying RDS using Windows PowerShell on Windows Server 2012 R2.
As you know, PowerShell has been around for quite a few years now (November 2006 to be exact). Over the past 8 years, we have seen PowerShell become an integral part of Windows. One such example is deploying RDS within your environment. In this blog, we are going to walk you through setting this up. With that, let’s get rolling!
Before we begin though, we need to import the RDS module using the
We will use the
cmdlet to begin with the installation. Below is the syntax for this cmdlet:
If you are installing the Session Host on the Connection Broker, then you need to run this cmdlet on a remote server, as running it on the connection Broker will give you the following error:
The Session Host role needs a reboot after the install, and we received the above error as PowerShell cannot resume the deployment after a reboot. However, this will work in the GUI if you do the same process.
In this deployment, we will use 3 servers for the deployment:
RDCBWA.spike.com – RD Connection Broker, RD Web Access, and RD Session Host
RDSH01.spike.com – Second RD Session Host
DC01.spike.com – RD license server
We will need to add RDSH01 and DC01 to All Servers pool on RDCBWA before we start the deployment.
Now we run the below cmdlet on RDSH01 to install RD Connection Broker, RD Web Access and RD Session Host on RDCBWA:
During the install, we’ll see the following progress meters:
1. Validation begins:
2. Deployment begins:
3. Connection Broker is installed:
4. RD Web Access role is installed:
5. RD Session Host role is installed:
6. After all roles are installed, the RDCBWA.spike.com server is restarted:
Once the PowerShell setup finishes, we now go to RDCBWA.spike.com and verify the installation. As you can see from the screenshot below, everything except the RD Gateway and Licensing server have been installed. We will now add another session host and a Licensing server.
First, let’s add the second RD Session Host server to our deployment. We will use the
cmdlet and run it on the Connection Broker this time.
And with that, you are done! Users can now access the Desktop Session and Remote App Collections.
Windows Server 2012 R2 comes with enormous amount of PowerShell cmdlets. In this article we’ve only seen a few of them. We may dive deeper into the power of PowerShell for managing RDS for Server 2012 R2 in future posts.
If you are interested in setting up a VDI deployment using PowerShell, please check the link below: