Archive

.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing"

<YourWindowsPowerShellScript>.ps1 cannot be loaded because the execution of scripts is disabled on this system.

Please see "get-
help about_signing" for more details.

If you are new to Windows PowerShell, you will see this message when you try to run a PowerShell script for the first time.

This is by design to have the default PowerShell’s execution policy is set to Restricted; that means that scripts - including those you write yourself - won’t run.

 

  • Just open up a PowerShell instance (press windows key and search for "power")
  • type "Set-ExecutionPolicy RemoteSigned" <enter>
  • OR  type "Set-ExecutionPolicy Unrestricted"

Now you should be able to start your script by running, "./yourScript.ps1"

or

Using by using PowerShell.exe.

 For example, in the Run dialog box you might type a command like

 powershell.exe -noexit c:\scripts\test.ps1

Running Scripts from the Run Dialog