How to Enable/Disable rdp using powershell

Enable RDP rule in Windows Registry :

reg add "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

Disable RDP rule in Windows Registry :

reg add "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

Enable RDP Network Level Authentication (NLA) in Windows Registry :

reg add "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" /v UserAuthentication /t REG_DWORD /d 1 /f

Disable RDP Network Level Authentication (NLA) in Windows Registry :

reg add "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f

Enable RDP in Firewall :

netsh firewall set service type = remotedesktop mode = enable

Disable RDP  in Firewall :

netsh firewall set service type = remotedesktop mode = disable
(Visited 3 195 times, 1 visits today)

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *