Dear Exchange 2007 Enthusiast(s),
I'd like to announce the Exchange 2007 PowerShell Scriptacular (download zipfile) demo pack. What is it you ask? Well... this collection of Exchange PowerShell scripts was developed by Mihai Jalobeanu and Vivek Sharma while they (we) developed the Exchange Management Shell. We had a lot of fun writing these scripts, and we used them to showcase the innovations in Exchange 2007 System Management--we also promised that when Exchange 2007 is released to the wild, that we'd make our favorite scripts available to everyone. So here they are!
If you want our exact demo setup: to get started, put everything in a directory (d:\scripts or something), and run generate. You need datafiles and you need to customize initvars.ps1. If you don't, the demo pack won't work.
Or you can just take a look at the scripts and learn from the bits and pieces that interest you.
Note: These are Microsoft copyrighted samples, are provided as-is and confer no warranties or rights.
Script Pack Contents:
- addfakeservers.ps1 and removefakeservers.ps1
NOT standalone. Makes it looks like your demo setup has more than one server. We use a very useful feature of Exchange 2007 setup to make this work. Basically we use the /provisionedserver switch to create pre-provisioned servers (AD objects). The admin interface detects these as servers, even though the hardware has not been installed yet. This enables server delegation and pre-provisioning in Exchange topologies.
- balancemailboxes.ps1
Standalone. This script shows how you can use PowerShell to easily load balance mailboxes by size across servers. Key thing is the use of get-mailboxstatistics and move-mailbox.
- cleanup.ps1 and generate.ps1
NOT standalone. Cleanup.ps1 completely restores your demo environment to a basic-just-installed-Exchange state. New car smell not included. Generate kicks off everything else to generate the demo environment.
- initvars.ps1
NOT standalone. Standard variables shared by all the scripts. Called by generate.ps1. MAKE SURE TO EDIT THIS FILE to customize this for your environment.
- mailstorm.ps1 and mailstorm2.ps1
Standalone with caveats. What's a demo Exchange enviroment without some email? BTW: this is the one script that is likely to not just work automatically in your environment. This is because we assume some basic auth settings to make the Hub server accept mail. This step is done in generate.ps1 so make sure you do that if you plan to use this script by itself.
- multi-matrix.ps1
Standalone. Totally totally useless. But cool damnit. This is the matrix unloaded ... er... powershelled.
- out-email.ps1
Standalone, with caveats. Just like the name implies, sends content over mail. You can pipe text to it. get-content c:\sometext.txt | out-email -to jimmy@crackcornandidontcare.com -subject "Report". It uses the "from" from initvars.ps1 so make sure to copy those lines as needed to make it standalone.
- out-html.ps1 and out-ie.ps1
Standalone. I already posted these to http://www.viveksharma.com/techlog earlier.
The datafiles are politician names, committees, standard drafts of the European Union. We've used US congress / house data in the past too---anything goes, it was publicly available data so it works great for demos.
The scripts (and their latest versions) can always be found at: http://www.viveksharma.com/techlog.
-Mihai Jalobeanu and Vivek Sharma