Failure in Powershell, it cannot be initialized, file blocked by software restriction policies, how to fix?

Asked

Viewed 324 times

0

I was using the package manager console in Visual Studio 2015, when opening the powershell appeared a message if I wanted to run it in an unreliable source file, I clicked yes on showed this message 3 more times, I clicked yes three times and then appeared this other message.

Translating into English the short message is this:

The shell cannot be started, a failure occurred during its startup: Errors occurred while loading Microsoft.Powershell.Core format data files, C: windows... Certificate.format.ps1.xml, the file was ignored due to the following validation exception: C file: windows... Certificate.format.ps1.xml cannot be loaded by software restriction policies like those created with the group policy

How to fix this problem?

1 answer

0

The standard Powershell execution policy is a bit restrictive even, you can see which restriction policy is active with cmdlet

Get-ExecutionPolicy

And you can use the cmdlet Set-ExecutionPolicy to change it

Set-ExecutionPolicy RemoteSigned

RemoteSigned works in most cases, it is only more restrictive than the Unrestricted.

Note: Don’t forget to open Powershell as an administrator.

More details on Using the Set-Executionpolicy Cdmlet

  • I had already performed this executionpolicy operation before posting here on stackoverflow and kept giving the same error message on powershel. I tried to do more things by searching on google, such as resetting the group policies of windows10 through commands at the prompt, uninstalled the visual studio but without success. I do not know if there is a way to restore the powershell in window10, which come in version 5.0, I did not find anything, nor in gringos forums, there are only ways to uninstall in windows 7 and in previous versions, I did not find anything from windows 10.

  • I already solved the problem here, I upgraded my Windows10 to its latest version and the powershell is back to normal.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.