Exchange | PowerShell

Using Powershell To Generate Test Mailboxes

There are situations where you may want to generate a number of test mailboxes whether it be for a demo or another scenario.  With Exchange 2007, you can leverage Powershell cmdlets to complete this process for you in just seconds. First, I start out with the a CSV file that contains a limited number of columns, basically the minimum needed to create an Active Directory user account and mailbox-enable it.  Since I have a passion for baseball, my test CSV file is a tribute to some of my favorite players in history.  This is what the sample users.csv file looks like: UPN,FirstName,LastName,Password bruth,Babe,Ruth,[email protected]! mmantle,Mickey,Mantle,[email protected]! hwagner,Honus,Wagner,[email protected]! brobinson,Brooks,Robinson,[email protected]! yberra,Yogi,Berra,[email protected]! kpuckett,Kirby,Puckett,[email protected]! rcarew,Rod,Carew,[email protected]! hkillebrew,Harmon,Killebrew,[email protected]! twilliams,Ted,Williams,[email protected]! jdimaggio,Joe,DiMaggio,[email protected]! Next, it only takes a couple lines of code for us to generate the accounts and mailboxes.  You can take this code and save it into a file named something like createmailboxes.ps1.  This is what the script should…

About JB

I’ve been a technologist for over 20 years, getting my start in IT with a large Fortune 100 international retailer in the 1990s. I love to talk about new technology, mobile devices, software development, photography, and the weather. The opinions expressed on this website are my own.

Follow me