How to use Exchange 2007 Powershell Scripts in a normal Console

I have been using Powershell for a while now, and now I am doing a lot more Exchange 2007 work. What I now wanted to do was work out a way that I could use the normal Powershell Console and run my Exchange 2007 Scripts. Another bonus of doing this would also allow me to use my Powershell IDE of choice “Sapiens’ PrimalScript“.

What I have found out is that the PrimalScript System uses the default Powershell console and Profile to configure it’s IDE for Development, Intellisense and Debugging. So to get it to work with Exchange 2007 Scripts I needed to find a way.

The solution was actually quite easy to complete, all that need to be done was add one line to my Powershell Profile.

The first thing that you must do is make sure that the Exchange 2007 Management Tools are installed and configured on your desktop.

Start by editing your Profile run the following command.

notepad $profile

The above command will open the Profile for the current user in Notepad for editing, if you do not have a profile yet you will need to create the following directory and then run the above command again.

Profile Directory : \My Documents\WindowsPowerShell\

When that is done add the following lines to the Profile

# Add the Microsoft Exchange 2007 Administration cmdlets to Powershell
Add-PSSnapin -name Microsoft.Exchange.Management.PowerShell.Admin

and save the Profile. Now if you restart your Powershell Console you will be able to call the Exchange 2007 Management cmdlets from the default Console.

Technorati Tags: Powershell

Cross Post from

3 thoughts on “How to use Exchange 2007 Powershell Scripts in a normal Console”

  1. Hi,

    While testing the above procedure, i getting error message in power shell as No windows powershell snapins are available for version 1.

    I would like to manage the Exchange 2007 in 32 bit system.

    Can you please help me on this.


Leave a Reply

Your email address will not be published. Required fields are marked *