blog.webwesen.com Rotating Header Image

Windows PowerShell Execution policy

The first time you try to execute a script from PowerShell you will most likely have to change the execution policy for PowerShell. It is recommended to set it to RemoteSigned. This would mean that all remote scripts must be signed or PowerShell will refuse to execute them. To change the execution policy:

Set-ExecutionPolicy RemoteSigned

If you’re uncertain what your execution policy setting is, type :

Get-ExecutionPolicy

For reference – these are all supported policy types:

  • Restricted
    No scripts can run.
  • AllSigned
    Ps1 and .Ps1xml files must be digitally signed.
  • RemoteSigned
    Ps1 and .Ps1xml files from the internet must be digitally signed.
  • Unrestricted
    No digital signatures are required and all scripts can be executed.

No related posts.

Leave a Reply