【笔记】Windows的远程桌面服务

前言

远程桌面协议(英语:Remote Desktop Protocol,缩写:RDP)是一个多通道(multi-channel)的协议,让用户(客户端或称“本地电脑”)连上提供微软终端服务的电脑(服务端或称“远程电脑”)。(维基百科

Remote Desktop Services (RDS), known as Terminal Services in Windows Server 2008 and earlier, is one of the components of Microsoft Windows that allow a user to initiate and control an interactive session on a remote computer or virtual machine over a network connection.(维基百科

开启远程桌面

1
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

关闭远程桌面

1
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

查看远程桌面开启状态

1
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections
  • 结果为0x0表示远程桌面开启,结果为0x1表示远程桌面关闭

开启远程桌面服务

1
net start TermService

关闭远程桌面服务

1
net stop TermService

降低加密等级

0:无需TLS加密
1:协商模式
2:强制TLS加密

1
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v SecurityLayer /t REG_DWORD /d 0 /f

关闭NLA安全校验

  • 关闭NLA安全校验后,可以先进入登录页面再进行登陆

0:关闭NLA验证
1:协商模式
2:强制NLA验证

1
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthenticationLevel /t REG_DWORD /d 0 /f

完成