How do I check for remaining days of Remote Desktop Services grace period if the server is also a Domain Controller (so I cannot logon as local admin)?
Asked
Active
Viewed 3.0k times
2 Answers
4
Correct answer:
Logon to your server as an administrator Start--All Programs--Accessories--Right-Click on Command Prompt and choose Run as Administrator
Enter the following command:
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays
-
This copy of server 2008 R2 is already activated. I am not speaking about Server 2008 evaluation period, but Remote Desktop Service grace period. – Danilo Brambilla Apr 10 '12 at 13:52
-
Does not work. It returns: ERROR: Description = Invalid namespace – Danilo Brambilla Apr 10 '12 at 14:04
-
2This does indeed work. The command was failing because there should have been a double backslash after "namespace:" – pk. Apr 10 '12 at 14:21
-
2It is correct now. If you copy and paste the above command into a command prompt that is running with Administrator elevation on your Remote Desktop server, it will work. If not, let me know precisely what error you're receiving. – pk. Apr 10 '12 at 14:29
4
to do this in PowerShell v2.0 you can use the following single line command:
(Invoke-WmiMethod -PATH (gwmi -namespace root\cimv2\terminalservices -class win32_terminalservicesetting).__PATH -name GetGracePeriodDays).daysleft

Nixphoe
- 4,584
- 7
- 34
- 52

Stephen Harper
- 41
- 1