赞
踩
查询和修改RDP状态
1、通过查询注册表,判断RDP是否开启
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections
2、使用CheckRdpStatus.ps1脚本查询RDP的状态
3、使用命令开启、关闭RDP状态,可能会被杀软拦截,使用时需要注意
- #开启RDP服务
- reg add "hklm\system\CurrentControlSet\Control\Terminal server" /v fDenyTSConnections /t reg_dword /d 00000000 /f
-
- #关闭RDP服务
- reg add "hklm\system\CurrentControlSet\control\Terminal Server" /v fDenyTSConnections /t reg_dword /d 00000001 /f
4、也可以使用RegfDenyTSConnections.ps1脚本开启或关闭RDP状态
查看RDP开放端口
RDP的默认端口可能会被修改,可以通过以下命令进行查询
tasklist /svc | findstr TermService #查找RDP进程的PID
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。