Windows Powershell is your friend!

I discovered windows powershell earlier today and have to say, this brilliant scripting tool needs to be embraced. It’s your friend!

Powershell can be downloaded from Microsoft at

For help getting started, there’s a brilliant scripting site, also available through Microsoft

You can also download a free reference card from to help you get started.

Writing a quick powershell Hello World example

1. Create the following code using notepad with the filename c:\Hello.ps1:

# Filename: Hello.ps1
Write-Host ‘Hello World!’
Write-Host "Good-bye World! `n"
# end of script

2. Lanch powershell (Start > Run > Powershell)

3. Type Set-Location ‘c:\’ to change the directory to where you want to run the script from

4. Type .\Hello to run the script within powershell and press enter



The first time I ran the script, I received an error message = Hello.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about-signing" for more details.

To fix this problem type Set-ExecutionPolicy RemoteSigned and press enter. Now re-run you script and off you go.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s