Queue users imported from the csv to be moved to the target exchange mailbox database
This script assumes the csv file has at least 1 column with a header of Alias which
contains the users account names.
Filtering and limitations can be applied based, but remember your only queuing up moves
they don't all move at once
# Queue users imported from the csv to be moved to the target exchange mailbox database
# Change the target database when needed
$myheader = "User move files"
$myheader| out-file ./usersmoved.txt -append -noclobber
Import-CSV .\userstomove.csv | foreach {
# Get there info
Get-User $_.Alias | New-MoveRequest -TargetDatabase 'Mailboxdatabase' -BadItemLimit '10' 2>&1 >> myerroroutput.txt
$thisstr = $_.Alias + "has been queued"
$thisstr | out-file ./usersmoved.txt -append -noclobber
}