![PowerShell 中的“AuthorizationManager 检查失败”,重新启动 WMI 后已修复](https://linux22.com/image/1493212/PowerShell%20%E4%B8%AD%E7%9A%84%E2%80%9CAuthorizationManager%20%E6%A3%80%E6%9F%A5%E5%A4%B1%E8%B4%A5%E2%80%9D%EF%BC%8C%E9%87%8D%E6%96%B0%E5%90%AF%E5%8A%A8%20WMI%20%E5%90%8E%E5%B7%B2%E4%BF%AE%E5%A4%8D.png)
大约每天一次,PowerShell 脚本就会在我的计算机上停止运行,并出现如下错误。
AuthorizationManager check failed.
At line:1 char:3
+ . .\matt.ps1
+ ~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
我没有更改执行策略(“远程签名”)。Windows Management Instrumentation 服务正在运行。重新启动 WMI 总是可以解决问题。我查看了事件日志,发现一些 DCOM 错误,也许它们有关联?
The server {784E29F4-5EBE-4279-9948-1E8FE941646D} did not register with DCOM within the required timeout.
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{D63B10C5-BB46-4990-A94F-E40B9D520160}
and APPID
{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}
to the user NT AUTHORITY\SYSTEM SID (S-1-5-18) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
这种情况已经持续了好几个月,即使从 Windows 8 升级到 Windows 10 之后也是如此。我希望找到解决方案。