2. 重新添加 Remote Desktop Services 重新创建服务(仅适用于服务被误删的情况) batch sc create TermService binPath= "C:\Windows\System32\svchost.exe -k termsvcs" displayname= "Remote Desktop Services" start= demand sc config TermService depend= Tcpip 启用远程桌面功能(适用于 Windows 10/11 专业版及以上) batch reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes 3. 修复系统文件(如果服务丢失或损坏) batch sfc /scannow DISM /Online /Cleanup-Image /RestoreHealth 4. 验证服务状态 batch sc query TermService 若输出包含 STATE : 4 RUNNING,则服务正常运行。 注意事项 管理员权限:所有命令必须以 管理员身份 运行 CMD。 Windows 家庭版:上述方法仅适用于 专业版 / 企业版,家庭版需通过升级系统或第三方工具实现远程桌面功能。 防火墙规则:启用远程桌面后,需确保防火墙允许 TCP 3389 端口通过。 注册表操作:修改注册表有风险,建议先备份或创建系统还原点。 如果问题仍然存在,建议通过 系统设置 > 远程桌面 或 服务器管理器(Windows Server) 进行可视化配置。