Wouldn’t it be great to pick a few mailboxes, export their properties to Excel, make a few changes, and use that changed file to provision a bunch of new user accounts and mailboxes? PowerGUI comes with commands to do that!
PowerGUI gives you user interface for a lot of actions which used to require scripting. While I am striving to find time at DEC to finish editing my webcast, so I thought I’ll do a few blogcasts (is there such a word already?) now instead.
Here we go:
1. Download and install PowerGUI on a computer which has either Exchange 2007 or its management tools.
2. Click Mailboxes, make sure that the following columns are displayed (right-click the header to add the columns): UserPrincipalName, Name, Database, OrganizationalUnit – these are mandatory for new Exchange mailboxes.
3. Select the mailboxes you want to export and click Report as CSV:
4. Specify the filename for the output (e.g. c:\test.csv) and click OK. The file will open in whatever is your CSV edit. Normally it should be Excel- in my case the machine didn’t have Office so I had to use Notepad:
5. Change the properties as you wish for the new mailboxes (in my case I just did Replace All), add new rows, add a column Password and set passwords for the new accounts (otherwise we’ll just use UPN for that).
6. Save the file.
7. In PowerGUI click Create new from CSV action.
8. Type in the file path and click OK.
9. That’s it – the new accounts and mailboxes got provisioned!
If you want to schedule provisioning to happen on regular basis (e.g. nightly) just go to the PowerShell Code tab and use the code there for your script.
PowerShell and PowerGUI rock! 😉