Link to home
Start Free TrialLog in
Avatar of compdigit44
compdigit44

asked on

PowerShell Scheduled Exchange 2003 to Exchange 2010 SP1

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
Avatar of Akhater
Akhater
Flag of Lebanon image

$MBX = get-mailbox -server 2003name -resultsize 30

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

Avatar of compdigit44
compdigit44

ASKER

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???
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
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?
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
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?
i am afraid i didn't understand the question, what do you mean by "by skill all resource mailbox on my 2003 server"
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
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 ?
Can the new-moverequest command be used to move groups of users within a DL group?
As what will happen is the new-moverequest is run against a mailbox that has already been moved?
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
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
>>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"
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...
ASKER CERTIFIED SOLUTION
Avatar of Akhater
Akhater
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial