No announcement yet.

Move Mailbox script - simple question - hopefully :)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Move Mailbox script - simple question - hopefully :)

    Hi peeps,

    I am transitioning some mailboxes from 2003 and 2007 to a new 2007 server.

    These users are required to go on certain message stores. So my script would look like this:

    move-mailbox TestUser1 -TargetDatabase "Exchange Server\MessageStore1\Database1" -BadItemLimit 0 -MaxThreads 1 -IgnorePolicyMatch -confirm:$false

    move-mailbox TestUser12 -TargetDatabase "Exchange Server\MessageStore4\Database4" -BadItemLimit 0 -MaxThreads 1 -IgnorePolicyMatch -confirm:$false

    move-mailbox TestUser5 -TargetDatabase "Exchange Server\MessageStore6\Database6" -BadItemLimit 0 -MaxThreads 1 -IgnorePolicyMatch -confirm:$false

    Does anyone know a way how I could call this script, but ensure that more than one mailbox move would run at the same time?

    Without moving more than one mailbox at a time, this would take a while.

    I could move all the users to one database and then from there remove them again, but this would duplicate the work. I would rather have the mailboxes moved to the correct database the first time around.

    Any Ideas?

  • #2
    Re: Move Mailbox script - simple question - hopefully

    dodgy answer:

    have a batch file, and a PS script for each mailbox move
    have te master batch file call each PS script, without waiting for the previous command to finish ?

    what you need, is something akin to a unix based command like an & (if I reemmeber correctly) that can put it into the background

    then you cuold do
    move-mailbox -identity joe &
    move-mailbox -identity fred &

    i'm not sure how to do it with powershell though sorry
    Please do show your appreciation to those who assist you by leaving Rep Point