We help IT Professionals succeed at work.

Need help moving 1000 various users 90 days old to new database?

355LT1
355LT1 used Ask the Experts™
on
If I can use a power shell command to help me select and move users to a new database with the command  Import-CSV the_users.csv | foreach { Get-Mailbox $_.alias | Move-Mailbox -TargetDatabase ‘TargetDB’ }

How do I create the csv file, can I use the get-mailbox command, what does get-mailbox command and the csv file look like ? I googled and cannot figure out how to setup the csv file

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
to can use Get-Mailbox, or Get-MailboxStatistics followed by any switch you want, and then pipeline it to csv file | export-csv c:\csvfile.csv

Get-Mailbox Description and Switches:
http://technet.microsoft.com/en-us/library/bb123685.aspx

Get-MailboxStatistics Description and Switches:
http://technet.microsoft.com/en-us/library/bb124612.aspx

export to a csv example:
http://technet.microsoft.com/en-us/library/ee176825.aspx

Author

Commented:
I kmow how to use Get-Mailbox commands and how to make csv reports, I just cannot figure out how to produce a csv to import into the move mailbox  command i..e   Import-CSV the_users.csv | foreach { Get-Mailbox $_.alias | Move-Mailbox -TargetDatabase ‘TargetDB’ } that will work. Do you have an exampe of the csv file?

Author

Commented:
incomplete answere