Exchange 2010 Powershell Scripting Resources
Use of the Exchange Management Shell can simplify your day to day administration tasks and allow you to automate complex procedures on Exchange 2010. When you begin using Powershell, it may seem daunting, but after learning the basics, you will soon grow to appreciate the flexibility Powershell provides and how you can help ensure routine tasks are always accomplished in a consistent way.
Getting Started
Before beginning with Exchange Management Shell scripting, it's worth getting a little bit of an introduction into Powershell so you can understand the basics about how to use it, and why it will be useful to you both for command-line administration and scripting. The TechEd Europe 2010 session "Windows Powershell for Beginners" is a fantastic introduction to Powershell in general, aimed at Windows administrators who've never used it before:
Windows Powershell for Beginners
After gaining a basic understanding of Powershell, the next step is to understand a little about the Exchange Management Shell and the cmdlets available:
- Overview of Exchange Management Shell
- Exchange Management Shell Basics
- Exchange 2010 Cmdlets
- Exchange Management Shell Quick Reference for Exchange 2010
After gaining both an understanding of Powershell and the Exchange Management commands available you should now be ready to start managing your Exchange environment using the Exchange Management Shell. As you get started, you may find it easier to example the Completion page when performing tasks in the Exchange Management Console GUI. The Completion page will show you the command used to perform the action, which you can then use examples to perform the same tasks on the shell.
Once you're confident managing some aspects of Exchange using the Management Shell, you are probably ready to start writing your first scripts. Although you can use Notepad, you may find dedicated Powershell editors far better to write scripts with:
Finally, to learn how to run scripts, or schedule them to run automatically, check out the TechNet Article Scripting with the Exchange Management Shell.
Script Repositories and Blogs
Don't re-invent the wheel when it comes to automating your Exchange environment with scripts. If you're doing something fairly common, then there's a good chance someone has already done it before. Even if you're doing something a little more unusual, you may find existing scripts that point you in the right direction, accomplish a part of what you are trying to do, or simply teach you a better way of accomplishing something.
And if you've written a script you think might be useful for someone else, share it with the world!
Exchange 2010 Specific Script Repositories
General Powershell Script Repositories
- TechNet Script Center Repository Home
- PoshCode.org - PowerShell Code Repository
- Powershell.com Script Library
Exchange Blogs Featuring Powershell Scripts
- Steve Goodman's Tech Blog - Powershell Section
- Glen's Exchange Dev Blog - Powershell Section
- Mike Pfeiffer's Blog - Powershell Section
- Shay Levy's Blog - Exchange Section
- Blog.powershell.no - Exchange Section
- PowerShell Needful Things - Exchange Section
- SMTP Port 25 - PowerShell Section
- Satheshwaran Manoharan's Blog - Exchange Section
- Mike Crowley's Whiteboard - PowerShell Tag
- Rhoderick Milne's Blog - PowerShell section
Getting Help
If you're struggling to find out what an error message means, or are unsure about whether something can be accomplished (or the best way to approach it), you'll find help available on the Technet Forums:
- TechNet Forums - Exchange 2010
- TechNet Forums - Exchange Administration
- TechNet Forums - Windows Powershell
- PowerShell.com Forums - PowerShell for Exchange
- PowerShellCommunity.org - Exchange Forum
See Also
To learn more about Powershell in general, check out the Windows PowerShell Survival Guide wiki page. The survival guide provides comprehensive links to assist with getting started and learning more about Powershell technologies.