PowerShell FAQ
  • Initial page
  • PowerShell Frequently Asked Questions
    • getting-started
      • How do I determine the location of the current PowerShell script?
      • How do I set the PATH in PowerShell?
      • How do I determine the current version of PowerShell?
      • How do I pass parameters to PowerShell scripts?
      • How do I fix "the execution of scripts is disabled on this system" errors?
    • learning-paths
      • Are there any free PowerShell ebooks?
      • Is there any free training for PowerShell
      • books-for-programmers
      • video-resources
      • books-for-newbies
    • frequently-asked-faq-questions
      • contributing
      • What's the license for this FAQ?
    • SUMMARY
    • justification
      • Why should I learn PowerShell?
Powered by GitBook
On this page

Was this helpful?

  1. PowerShell Frequently Asked Questions
  2. getting-started

How do I fix "the execution of scripts is disabled on this system" errors?

PreviousHow do I pass parameters to PowerShell scripts?Nextlearning-paths

Last updated 4 years ago

Was this helpful?

On Windows desktops and older versions of Windows Server, not only is the .ps1 extension not associated with PowerShell, PowerShell scripts are not enabled by default. In order to run scripts, you must first run Set-ExecutionPolicy RemoteSigned. If you're not the administrator of the machine, you may need to add the -Scope CurrentUser option. For more information, read the help: Get-Help Set-ExecutionPolicy -Online.

An administrator may alter the execution policy for a single instance PowerShell when launching PowerShell by using the ExecutionPolicy parameter (ie: PowerShell.exe -ExecutionPolicy Bypass).

Set-ExecutionPolicy
About Execution Policies