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.
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
Cross Post from www.virtualrealm.com.au