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 http://blogs.msdn.com/b/powershell/archive/2008/12/30/download-windows-powershell.aspx

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

http://technet.microsoft.com/en-gb/scriptcenter/powershell.aspx

You can also download a free reference card from http://refcardz.dzone.com/refcardz/windows-powershell 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
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

clip_image002

Troubleshooting

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.

Managing your alerts within a SharePoint team collaboration site

After you’ve set an alert using an alert me function, you may wish to revisit it in the future to either turn it off or re-configure. 

To do this navigate to:

http://<yoursiteurl>/_layouts/mysubs.aspx

From this page you can manage the list of libraries, files, lists, and items for which you receive alerts on the given site. Note that some alerts, such as system generated task alerts, do not appear on this page. Simply click the name of an alert to edit its settings.