下载subinacl工具:https://www.sky-deep.com/subinacl.exe
备用下载链接:https://sillage.wang/upload/sillage/subinacl.exe
执行如下
#::第1步:更改 GracePeriod 的所有者为 administrators
subinacl /subkeyreg "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod" /setowner=administrators
#::第2步:设置 GracePeriod 为 administrators 完全控制
subinacl /subkeyreg "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod" /grant=administrators=f
#::第3步:删除 GracePeriod
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod" /f ```
重启Remote Desktop services服务就可以了。
参考:https://blog.csdn.net/dgxj_skxx/article/details/134893558