Solved

PowerShell Scheduled Exchange 2003 to Exchange 2010 SP1

Posted on 2011-03-03
16
767 Views
Last Modified: 2012-05-11
Via on the GUI have have successfully move a mailbox from 2003 to 2010 by following the steps outlined in the article below and it work perfectly

http://www.myexchangeworld.com/2011/01/migrating-from-exchange-2003-to-exchange-2010-%E2%80%93-same-forest-%E2%80%93-part-7/

Know here is my problem I'm not good in powershell but I need a way to automated all of the steps I did via the GUO automated so they can by kicked off via Task Scheduler. I have well over 700 mailbox and would like to move mailbox during the early morning hours in batches of 20 - 50 or through A-M etc.. Where ever is easier..

I cannot be the only one faced with this issue
0
Comment
Question by:compdigit44
  • 8
  • 8
16 Comments
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
$MBX = get-mailbox -server 2003name -resultsize 30

$MBX | new-moverequest -targetdatabase "2010 database name"

0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Thanks for the reply my questions are as follows:
1) Why do I need the $MBX variable?
2) IF I were to save this as a *.ps1 file could Task Schedule run it?
3) Is it possible to have the script to append all of the mailboxes moved to a text file
4) If the script is moveing mailbox in batches of 30 how are the mailbox select is it in Alphabetical order???
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
1) Why do I need the $MBX variable?

because in exchagne 2010 get-mailbox -server 2003name -resultsize 30 | new-moverequest -targetdatabase "2010 database name" will not work


2) IF I were to save this as a *.ps1 file could Task Schedule run it?
http://www.zerohoursleep.com/2010/04/how-to-run-exchange-ps1-script-as-scheduled-task/


3) Is it possible to have the script to append all of the mailboxes moved to a text file
what do you mean by this ?

4) If the script is moveing mailbox in batches of 30 how are the mailbox select is it in Alphabetical order???
No it is not add -SortBy:Name if you want them by order
get-mailbox -server 2003name -resultsize 30 -SortBy name
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Please bare with me here since I'm new to powershell.

1) So the $MDX is a variable that needs to be there other wise the script will not work but how can you run the new-moverequest command right from the console with out have to prefix it with a varialbe

2) Still have to review the link you sent

3) What I mean is for the script to generated a log file in order words a list for mailbx out be writen to the test file that were succesfully move. This is more for a checks things for myself.

I forgot to ask before does this script automatically clear the move request once the mailbox has been successfully moved?
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
1) So the $MDX is a variable that needs to be there other wise the script will not work but how can you run the new-moverequest command right from the console with out have to prefix it with a varialbe
$MBX is a variable that contains the result of get-mailbox -server 2003name -resultsize 30
so first step is
$MBX = get-mailbox -server 2003name -resultsize 30 <<< populating the variable
second step is

$MBX | new-moverequest -targetdatabase "2010 database name" <<< if you prefer for each mailbox in $MBX initiate a new-moverequest

3) What I mean is for the script to generated a log file in order words a list for mailbx out be writen to the test file that were succesfully move. This is more for a checks things for myself.
the script will never know if the move was completed or not, it is just sending a moverequest to the server you will need to check these under move requests in the EMC


4) I forgot to ask before does this script automatically clear the move request once the mailbox has been successfully moved?
Again the script doesn't know if the move mailbox completed or not
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Ok I think I'm undstanding things now..

One for questions what would I need to added to the script if I want to move all mailbox by skill all resource mailbox on my 2003 server?
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
i am afraid i didn't understand the question, what do you mean by "by skill all resource mailbox on my 2003 server"
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
I have mailbox in 2003 that are resoucres A.K.A conference rooms. I know if 2010 these mailbox are treated differently. I thought it might me best if these were not migrated automatically via the scrupt since they need to be updated in 2010 or am I way off base
0
Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

 
LVL 49

Expert Comment

by:Akhater
Comment Utility
I am sorry I will not be able to help with this, I have no extensive experience with resource mailboxes migration. migrate them manually perhaps ?
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Can the new-moverequest command be used to move groups of users within a DL group?
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
As what will happen is the new-moverequest is run against a mailbox that has already been moved?
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
what do you mean by this ?  new-moverequest will move users mailboxes

you mean you want it to get the users inside a specific group and move their mailboxes ? then yes it can be done easily

>>As what will happen is the new-moverequest is run against a mailbox that has already been moved?<<
nothing since the mailbox is already in the correct location nothing will happen
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Thanks for the replay so if a new-moverequest is run against an already moved mailbox, with will move onto the next mailbox if it is in a script correct?

How would I use the new-move request to move users based on DL gruops
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
>>Thanks for the replay so if a new-moverequest is run against an already moved mailbox, with will move onto the next mailbox if it is in a script correct?<<

yes it will give an error on that mailbox that it is already in the target database and move on to the next one


$group = [ADSI] "LDAP://cn=group,ou=OU,dc=domain,dc=org"
$group.member |  new-moverequest -targetdatabase "2010 database name"
0
 
LVL 19

Author Comment

by:compdigit44
Comment Utility
Before I actually run this script is there so way for me to run it in a audit or trial mode that will run like is would if it were to move mailboxes except is would moving anything..

A Dry run...
0
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
Comment Utility
add a -whatif add the end of move request
0

Featured Post

Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now