Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
    
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
2  
This does indeed work. The command was failing because there should have been a double backslash after "namespace:" –  pk. Apr 10 '12 at 14:21
    
@pk edit Thank you this is working now –  Danilo Brambilla Apr 10 '12 at 14:26
2  
It 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

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.