How to make a userlist csv file for Exchange 2007 Mailbox Move?

355LT1
355LT1 used Ask the Experts™
on
I can't  get yhis power shell command to move users to a new database with the command;

I tesing  moving Exchange mailboxes with the powershell command  Import-CSV the_users.csv | foreach { Get-Mailbox $_.alias | Move-Mailbox -TargetDatabase ‘TargetDB’ } and I am not successful.

 I kmow how to move single users and how to  use Get-Mailbox commands and how to make csv reports, I just cannot figure out how to produce a the ideal csv to import into the move mailbox command that will actually work right.. Do you have an exampe of the csv file to use with the above move command?

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AmitIT Architect
Distinguished Expert 2017

Commented:
AmitIT Architect
Distinguished Expert 2017

Commented:
Multitechnician
Top Expert 2014
Commented:
you need to set the column names
looking your script you only need one column : alias

alias
username1
username2
username3
username4

Open in new window

leakim971Multitechnician
Top Expert 2014

Commented:
Seelan NaidooMicrosoft Systems Admin

Commented:
please post the error, its normally  a good indication of what the error is..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial