Creating Mailboxes for User Accounts that already exist (Exchange 2003)…
Hello everyone! – I am back from a wonderful trip to Greece, slightly tanned, needing another holiday and eager to resume my writing here. I hope that you are all well – and still enjoy this Blog.
Anyway – I arrived home on Wednesday night, then (rather stupidly) returned to work on the Thursday, managed to get through the day and then when I got home – proceeded to have a number of beers and then passed out, therefore tonight has been the first opportunity that I have had to have a look around the forums and see what has been going on in the world of Exchange.
Anyway on my travels around the forums I found this post from a buddy of mine (Phil – or Scouser as he is known on MSEXCHANGE.org) asking if there was a way to create mailboxes for around 80 accounts which already exist. This stirred my memory about a script that I wrote a little while ago which was based upon KB327079.
The original Microsoft script gives you an example of how you can, using CDOEXM create a mailbox for a user which resides in the Users Container in AD and place the mailbox in a random store on your Exchange Server, however the script that I wrote will allow for you to specify an OU where your user accounts are located -AND– choose the store that you wish to place them in.
The script uses the CDOEXM CreateMailbox function, therefore I recommend that you run it directly on your Exchange Server -or– if you run into problems on a DC that has both the ESM and Exchange ADUC extensions installed.
Instructions:
Download the following script to your Exchange server – place it in a folder such as C:\CreateUsers:
CreateMailboxes-ForAccounts.vbs
From the CreateUsers folder, double click on the CreateMailboxes-ForAccounts.vbs file – which will display the following prompt:

Here you need to supply the DN path to the OU – so for example, if all my users are contained in an OU called “ExchangeUsers” – then in the above box I would type OU=ExchangeUsers – if however, my users are in an OU called Exchange – which has a PARENT OU called EUSERS then the above syntax would be: OU=Exchange,OU=EUSERS.
Generally speaking I would place the account that you wish to operate on in a single OU in the root of the ADUC Management console – and then move them when you are done.
When you are happy with the DN syntax above – click on the “OK” button which will display the following prompt:

Here you will need to type in the name of the DATABASE that you wish to place your users mailboxes into – the above example will place all of the Mailboxes into a database called “Gen Database” – when you are happy with your selection, click on the “OK” button.
The Script will then go away and process the changes – when it has completed you will be presented with the following prompt:

Click on the “OK” button to close the script and you should now have mailboxes configured for all your user accounts.
Add this page to your favorite Social Bookmarking websites
Last Updated (Wednesday, 30 December 2009 17:09)





