Monday, December 19, 2016

How To View Current Execution Policy PowerShell

Overview


On Windows platform, Windows machine with PowerShell is easier than earlier. PowerShell provides various cmdlets to manage windows machine on local and remote servers.

In order execute a PowerShell script is the view and change Execution Policy.

Applies To


Tested on Windows 10, Windows 2008 R2, Windows 2012.

Pre-Requisites


To run this script, Execution Policy should be set to either of these “AllSigned” or “RemoteSigned” or “Unrestricted”, you can get current execution policy by running the command; “Get-ExecutionPolicy”.

Policy Purpose
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.

Current Execution Policy


To know the current run the PowerShell cmdlet; Get-ExecutionPolicy

To list execution policies that can be configured run the PowerShell cmdlet; Get-ExecutionPolicy -List





SlideShare Information


Step by step guide with screenshot is uploaded to slideshare.

 

No comments:

Post a Comment