Export (0) Print
Expand All
Expand Minimize
4 out of 5 rated this helpful - Rate this topic

Using the Get-ExecutionPolicy Cmdlet

Listing the Windows PowerShell Script Execution Policy

The Get-ExecutionPolicy cmdlet simply tells you which of the four execution policies (policies that determine which Windows PowerShell scripts, if any, will run on your computer) is currently in-force. The Windows PowerShell execution policies include the following:

  • Restricted - No scripts can be run. Windows PowerShell can be used only in interactive mode.

  • AllSigned - Only scripts 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.

To determine the execution policy simply run the cmdlet without any parameters:



Get-ExecutionPolicy

To change the execution policy, use the Set-ExecutionPolicy cmdlet.

Related Links

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.