Freigeben über


So which version of Powershell do I use..?

I have been a little quiet this week due to a whole host of reasons, primarily catching up from ITForum and writing a LightsOut Powershell script for Ex2007 - I will be blogging exactly how to do this once it's complete - which is very close.

However, before I do, I came across some syntax yesterday which needs some explaining. But in order to explain a little scene setting is required.

In order to install Exchange 2007 a pre-req is to install Windows Powershell 1.0 (RTM), which you can get from here. So just before you install Ex2007 you can Start --> Programs --> Windows Powershell and the blue Powershell shell comes to life, however that imposes a problem with regard to Ex2007 - How does this work when we are doing a LightsOut (Unattended) install..?

If you run Get-PsSnapin this will list what Snapin's are available of the current system - In my environment I see five, none of them being Exchange.

So if we're running an unattended installation of Ex2007 - how can we run Exchange CMDlets..?

Here's a snippet of the code that you can run from a .PS1 file (I will explain this further in the next week or so)

"<Location of Ex2007Setup>\Setup.com /r:M,C,H"

Add-PsSnapin *Exchange*  <-- Here's the key, once we have installed Exchange using Windows Powershell we then need to add the Exchange Snapin for everything Exchange related

Once Exchange has been installed then it does of course have the Exchange Shell which you all know about.

More on what else we can do next week...

Comments

  • Anonymous
    January 01, 2003
    Myself and Brett played with some coding last week and I wanted to share with you what we done. Brett&rsquo;s...