Exchange 2007 PowerShell Scriptacular Demo Pack is a collection of Exchange PowerShell scripts developed by Mihai Jalobeanu and Vivek Sharma while they developed the Exchange Management Shell. They used them to showcase the innovations in Exchange 2007 System Management – and promised to make their scripts available when Exchange 2007 was released to the wild.
Script Pack Contents:addfakeservers.ps1 & 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 & generate.ps1 (NOT Standalone)Cleanup.ps1 completely restores your demo environment to a basic-just-installed-Exchange state. New car smell not included. Generate.ps1 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 & 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 firstname.lastname@example.org -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 & out-ie.ps1 (Standalone)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.
NOTE: Put everything in one folder (i.e. d:scripts), and run generate. You need datafiles and you need to customize initvars.ps1. If you don’t, the demo pack won’t work.