AuthorizationManager check failed when launching scripts in PowerShell

Recently, I received this error when trying to run a script on my Server 2008 R2 server.

AuthorizationManager check failed.
At line:1 char:3
+ & <<<< ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 '
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException

I was also unable to run the command set-executionpolicy remotesigned:
Set-ExecutionPolicy : Not found
At line:1 char:20
+ set-executionpolicy <<<< remotesigned
+ CategoryInfo : NotSpecified: (:) [Set-ExecutionPolicy], ManagementException
+ FullyQualifiedErrorId : System.Management.ManagementException,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand

Solution:


  1. Open a command prompt "As Administrator"

  2. run "winmgmt /salvagerepository"

If /salvagerepository doesn't fix the WMI errors, you can disable the WMI service, reboot, rename the \wbem\repository folder, enable the WMI service and reboot again.

Comments

Popular posts from this blog

Exchange 2010 event errors 2601, 2604, 2501

"The following factors also affect the level of access for" user with excess permissions

Robocopy Error 31 A device attached to the system is not functioning