How to Manage Remote Desktop Services (RDS) with PowerShell

In this blog post, I will show you how to manage Remote Desktop Services (formally known as Terminal Services) using Microsoft PowerShell cmdlets.

Remote Desktop Services 2019

In my case, I have Remote Desktop Services farm running Windows Server 2019.

By default Windows, Server 2019 RDS Server comes with the PowerShell module installed.

To get started, I will start PowerShell using the “Run as Administrator” options.

The name of the RDS PowerShell module is “remotedesktop“.

To view all the RDS cmdlets I use the command below.

Get-Command -Module remotedesktop

To view all the RDS Servers in the farm, I will use the following cmdlet as seen below:

If you need to view all users that are connected to the RDS farm, use the cmdlet below.

Get-Rdsession

In the cmdlet in the example below to view all the remote apps.

Get-RDremoteApp

Posted

in

by

Comments

One response to “How to Manage Remote Desktop Services (RDS) with PowerShell”

  1. Peter Johnson Avatar

    Nice article. Additionally, one can also remotely access desktop services using tools like R-HUB remote support servers, Logmein etc. They work well.