- Check RDP enable status remotely via command line
C:>reg query “HKLMSYSTEMCurrentControlSetControlTerminal Server” /v fDenyTSConnections
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server
fDenyTSConnections REG_DWORD 0x0
C:>
- Enable RDP enable status remotely via command line
C:>reg add “HKLMSYSTEMCurrentControlSetControlTerminal Server” /v fDenyTSConnections /t REG_DWORD /d 0
The operation completed successfully.
C:>
- Adding users to Remote Desktop Users group via WMI in Powershell Command line:
PS: ([ADSI]"WinNT:///Remote Desktop Users,group").add("WINNT:///,user")