Extending Remote Desktop Services using PowerShell – Part 7

(Post courtesy Manoj Ravikumar Nair, who you can follow on his excellent blog at https://www.powershell.ms)

Previous Post: Extending Remote Desktop Services using PowerShell – Part 6

Using Best Practice Analyzer for Remote Desktop Services

To use the Best Practice Analyzer for Remote Desktop Services, we will import the Best Practices Module for PowerShell

clip_image001

clip_image003

The Get-BpaModel tells you which all Scans are available for you to run on the box. As shown in the screenshot below, we do have access to the Microsoft/Windows/TerminalServices scan since the RDS Role has been installed on the server.

clip_image004

To run the scan, we will pipeline the Get-BpaModel to the Invoke-BpaModel Cmdlet as shown below:

clip_image006

The final step is to use the Get-BpaResult command to get the results dumped on the console. Note that we are in compliance with most of the Rules. J

clip_image008

Next Steps

Wow!! Now that was too much of a PowerShell dose. However, hopefully you will now start truly appreciating the “Power of PowerShell”.

Having understood what you need to know about RDS PowerShell to automate it, you can start leveraging your new found knowledge to start scripting some advanced stuff.

Here are some additional references.

TechNet Script Center Repository

https://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=remotedesktopservices&f%5B0%5D.Text=Remote%20Desktop%20Services

RDS RemoteApp PowerShell Module

https://archive.msdn.microsoft.com/PSRDSRemoteApp

If you recollect from the first part, you can use this Module to author a simple script that would pull the RemoteApps from Remote Servers.

I hope you found the series informative. Please do let me know your valuable feedback by replying to this post.

Go back to series beginning.

Enjoy your quest to conquer PowerShell. Be what’s Automated…™