In this article we will take a look at how to write a custom cmdlet for Windows PowerShell, which is the new command shell from Microsoft (formerly called "Monad"). Our cmdlet named "Get-Contact" will have the ability to retrieve contacts defined in Outlook 2007.

The full source code, inlcuding unit tests, installations scripts etc. can be found here.

The contents of this post is as follows:

1. In the first section, we will take a quick look at PowerShell. We look at the main drivers behind it's creation and what some of the key factors are that differentiate PowerShell from other well-known shells and scripting environments.

2. In the second section,we tell you how to download PowerShell if you don't have it installed yet (shame on you! ;-), and take a quick look at the PowerShell Extensions (PCX) library, which is an open-source project for writing custom PowerShell extensions.

3. Next we take a look at PowerShell cmdlets, we'll show some examples, and discuss Microsoft's naming standards.