For Windows 2008, I need to create a script that will show whether connected RDP sessions are set at "high" encryption or something else (e.g., "compatible").

Does anyone know of a way to get this without going through the GUI?

I investigated wmic and powershell, but was unable to locate anything. I found a .net Powershell module for Terminal Services, but all it would do was display the status (i.e., list sessions). I actually need to see the encryption level.

  • Curiously, the session status GUI has only a blank field where the encryption status should be. Apparently this information is hard to get.
    – Nic
    Commented Nov 27, 2011 at 0:56

2 Answers 2


Looks like this power shell command should do it for you

get-childitem -path RDS:\RDSConfiguration\Connections\RDP-Tcp\SecuritySettings\EncryptionLevel | format-list


  • 2
    I believe that just shows the current Remote Desktop Session Hosts capabilities, not the status of individual sessions. Will double-check.
    – Adam Brand
    Commented Oct 8, 2011 at 18:33

The C++ API for this is the WTSQuerySessionInformation with 26 as the value for WTS_INFO_CLASS. None of the included Powershell Modules implement this, but there is one in the TechNet script gallery here. The underlying module does implement a couple of types that are not available until Server 2008 R2, though so you may have to modify it slightly to get it to work as expected. You can find more info on the supported structures here. I know this is close to a year after the fact, but maybe others are searching for this...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .