Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PowerShell Scheduled Exchange 2003 to Exchange 2010 SP1

Posted on 2011-03-03
16
Medium Priority
?
774 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 8
16 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 35032206
$MBX = get-mailbox -server 2003name -resultsize 30

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

0
 
LVL 20

Author Comment

by:compdigit44
ID: 35036286
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
ID: 35036326
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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 20

Author Comment

by:compdigit44
ID: 35036378
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
ID: 35036409
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 20

Author Comment

by:compdigit44
ID: 35036593
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
ID: 35036620
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 20

Author Comment

by:compdigit44
ID: 35036656
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
 
LVL 49

Expert Comment

by:Akhater
ID: 35036696
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 20

Author Comment

by:compdigit44
ID: 35151036
Can the new-moverequest command be used to move groups of users within a DL group?
0
 
LVL 20

Author Comment

by:compdigit44
ID: 35151042
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
ID: 35154660
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 20

Author Comment

by:compdigit44
ID: 35157805
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
ID: 35157950
>>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 20

Author Comment

by:compdigit44
ID: 35165348
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 2000 total points
ID: 35167401
add a -whatif add the end of move request
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
This video discusses moving either the default database or any database to a new volume.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

636 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