
Using the . NET Framework to
Automate Exchange
PowerShell Tasks
In this chapter you ’ ll see how to leverage Exchange PowerShell from within the .NET Framework
and how to make a basic web - based page to run PowerShell cmdlets. We also discuss some ideas
on what can be done to use .NET. This chapter involves some programming, so previous experience
would be helpful.
PowerShell is built on the .NET Framework, and the only management interface exposed for Exchange
Server 2007 is the PowerShell cmdlets, so running PowerShell from within something like C# or
VB.NET would be easy. Because this is the only interface that is exposed, the Exchange product team
uses the PowerShell cmdlets to provide the Exchange Management Console graphical management
tool. You can run PowerShell cmdlets easily from within the .NET Framework, and you will work
through a few examples in this chapter.
This chapter covers the following topics:
❑ Accessing PowerShell from the .NET Framework
❑ Solving problems with PowerShell and the .NET Framework
Accessing PowerShell from the
. NET Framework
To be able to work with PowerShell from the .NET Framework, you need to first download the
Windows PowerShell Software Development Kit (SDK) from Microsoft. To be able to run any of
the Exchange cmdlets you will also need the Exchange Server 2007 management tools installed.
c17.indd 485 ...