User Rating: 4 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Inactive

Article Index


Allow the Script to Execute

After you saved the script to your computer and tried to execute it, you will find out that you are not allowed to run it. That is because the default ExecutionPolicy on Windwos 7 is to restrict all PowerShell scripts. You will have to change the ExecutionPolicy to allow an administrator account to execute local PowerShell Scripts. That administrator account will also be the one under which the Task Scheduler action will be run.

First, find Windows Powershell in Start Menu -> All Programs -> Accessories -> Windows Powershell. Right click on it and use 'Run as administrator' if you didn't sign in with an admnistrator account. Enter this command

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

at the prompt (as shown in PIC-1). That will allow the administrator account to execute local and signed remote PowerShell scripts.

PIC-1 Set-ExecutionPolicy

FaLang translation system by Faboba