Allowing the execution of PowerShell Scripts on Windows 8 is useful if you want to run and use some PS scripts, here’s how
Windows PowerShell is a .NET framework integrated Microsoft Automation Framework, consisting of command line shell and associated scripting language. PowerShell provides full access to COM and WMI enabling Administrators to perform administrative tasks on both local and remote Windows Systems.
PowerShell has a number of execution modes that define the type of code that runs. This is governed by a registry key that runs in the HKLM hive.
The execution modes are:
- i. Restricted– Default execution policy. Do not run scripts.
- ii. Allsigned– Runs all scripts and Configuration file.
- iii. Remote signed-Runs without signature.
- iv. Unrestricted-Run scripts downloaded from the communication application.
If your PowerShell is not previously configured, then if you download a script from the internet and run it, it’ll show errors. So to allow execution of the PowerShell Scripts in Windows 8, follow the tutorial below.
Steps to allow the Execution of PowerShell Scripts
1. Press Windows + C to open the Windows Charm Screen-> Select Search-> In the Apps Search Field type Windows PowerShell.
2. The Windows PowerShell Command Prompt will open.
3. In the Windows PowerShell Command Prompt type the following command Set-ExecutionPolicy Unrestricted and press Enter
4. They will ask you if you surely want to change the Execution Policy, press Enter to confirm it.
5. If you want to change the Policy to Restricted, then type the following command Set-ExecutionPolicy Restricted and press Enter. They will ask you if you surely want to change the Execution Policy, press Enter to confirm it.