Deletion of Mail Enabled Users & Creation of Mailbox Enabled Users - PowerShell
Hello, We are migrating from Netscape to Exchange 2007 and currently have Netscape users as MailEnabled Users in AD. In order to migrate data we need to delete themailenabled userthen create the mailbox in the necessary store. What we require is an automated way to perform this task using PowerShell for 100's of objects. So if we have a 50 users that are going to be migrated, those 50 mail enabled users are"disabled" in AD and a mailbox is created for them (Mailbox Enabled) all in one task. Furthermore we have created our stores in alphabetical order. If there is a way to have the mailbox created in the correct store based on the first initial of the user, this would be ideal. If not, then its not a big deal. Any assistance is appreciated. Thanks, JJack
January 30th, 2009 12:49am

I too had to do a migration to Exchange 2007 before SP1 and found the follow page very helpful in terms of bulk user edits.http://techstarts.wordpress.com/2007/02/21/bulk-user-creation-using-powershell-2/As for creating the mailboxes in the proper store I wrote a script that did something similar. It shouldn't be too hard to adapt the following code snippet to your circumstance.# fi ~ first initial$fi = $login.substring(0,1)if ($fi -lt 'e'){# tdb ~ target data base / info. store$tdb = "EXCHANGE\FOLDER A-D\STORE A-D"} elseif ($fi -lt 'l') {$tdb = "EXCHANGE\FOLDER E-K\STORE E-K"} elseif ($fi -lt 'r') {$tdb = "EXCHANGE\FOLDER L-Q\STORE L-Q"} else {$tdb = "EXCHANGE\FOLDER R-Z\STORE R-Z"}if ($tdb){Move-Mailbox -TargetDatabase $tdb -Identity "$($login)" -DomainController dc1.domain.com -GlobalCatalog dc1.domain.com -SourceForestGlobalCatalog dc1.olddomain.com -SourceForestCredential $sc -TargetForestCredential $tc -Confirm:$false -PreserveMailboxSizeLimit -RetryTimeout 20 -BadItemLimit 999999;
Free Windows Admin Tool Kit Click here and download it now
January 30th, 2009 2:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics