Setting Up Windows PowerShell

I am forever hopeful about new environments and languages, and even after initializing my Windows workstation to run PowerShell scripts, I still remain hopeful.

The following is an excellent stackoverflow.com post covering an error you might get if you are running PowerShell  for the first time on a Windows platform other than Windows server.

Basically, until I get the whole script signing thing down, and because I do not download just anything I’m sent and sit behind reasonable content and firewall protection, I removed script running restrictions after I got this error — PowerShell execution of scripts is disabled on this system — trying to run Windows PowerShell scripts.

Basically, both the 32 and 64-bit versions of PowerShell have to have this setting changed. The easiest way to do this is to go to the start menu and search for

both versions of Windows PowerShell ISE, that is PowerShell ISE x86 and PowerShell ISE.

Run each of these as administrator, and then issue this command for unrestricted script running


Set-ExecutionPolicy RemoteSigned

or


Set-ExecutionPolicy RemoteSigned


<code>Set-ExecutionPolicy unrestricted</code>

and answer Yes when prompted.

I was trying to experiment with GUIs using this information, so we will see how that all goes.

Advertisements

Leave a comment

Filed under PowerShell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s