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

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](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy)
* [About Execution Policies](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://poshcode.gitbook.io/powershell-faq/src/getting-started/execution-policy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
