Check Execution Policy

Read more About Execution Policies
All PowerShell execution policies:
  • Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode.
  • AllSigned – Only scripts that are signed by a trusted publisher can be run.
  • RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.
  • Unrestricted – No restrictions; all Windows PowerShell scripts can be run.

The “Get-ExecutionPolicy” cmdlet shows the current PowerShell execution policy.

The “Set-ExecutionPolicy” cmdlet changes the PowerShell execution policy.

Example –

  • By default in my windows 10 client machine. Scope of execution policy was set to Undefined. I used Get-ExecutionPolicy -List command
  • By using Set-ExecutionPolicy -ExecutionPolicy RemoteSigned command and it changed LocalMachine scope to RemoteSigned.

Leave a comment

About the author

Sophia Bennett is an art historian and freelance writer with a passion for exploring the intersections between nature, symbolism, and artistic expression. With a background in Renaissance and modern art, Sophia enjoys uncovering the hidden meanings behind iconic works and sharing her insights with art lovers of all levels. When she’s not visiting museums or researching the latest trends in contemporary art, you can find her hiking in the countryside, always chasing the next rainbow.