How to check remaining days of Microsoft RDS CAL grace period

Case #

You need to know how many days are remaining in your Microsoft RDS (Remote Desktop Services) installation where you are still making use of the grace period.

Solution #

Windows command line #

Execute the following command in an elevated window.

wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays

Powershell #

Execute the following command in an elevated window.

(Invoke-WmiMethod -PATH (gwmi -namespace root\cimv2\terminalservices -class win32_terminalservicesetting).__PATH -name GetGracePeriodDays).daysleft

Powered by BetterDocs