This project is read-only.

Windows 7 - ExecutionPolicy

Sep 30, 2009 at 9:33 AM

Hi, I'm new to PowerShell and I wanted to try the tutorial. However when I downloaded the .zip file, unzip it and run .\TryPowerShell.ps1 I received the following warnings:

PS C:\Users\Lukas> .\Documents\Downloads\TryPowershell\TryPowerShell.ps1
File C:\Users\Lukas\Documents\Downloads\TryPowershell\TryPowerShell.ps1 cannot be loaded because the execution of scrip
ts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:54
+ .\Documents\Downloads\TryPowershell\TryPowerShell.ps1 <<<<
    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

Can somebody explain me or point me to a tutorial how to set up the environment so I can run the tutorial? I tried setting some policy but I'm lost in it.


Oct 1, 2009 at 1:17 AM

Set-ExecutionPolicy UnRestricted

Changes the user preference for the Windows PowerShell execution policy

Oct 1, 2009 at 8:49 AM
Edited Oct 1, 2009 at 8:49 AM

Thanks. That helped (except I still had to press 'r' dozen times to confirm I want to run the script downloaded from the internet).

I skimmed the application and I like it - good job!

Oct 1, 2009 at 2:07 PM

Right mouse click the ps1 file. Select properties. There should be an Unblock button.

Doing that to the zip file before unzipping should help as well.

Oct 1, 2009 at 4:49 PM

Cool! Unblocking .zip file is the best way.