Question:How To Schedule Mailbox Move In Exchange Server 2010

To schedule Mailboxes move in Exchange Server 2010 we need to do two things:

  1. Move request script
  2. Schedule the script to run using Windows task scheduler

 

To start, we will use this script to move the mailboxes:

add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010

What Are The 3 Azure Network Securi... x
What Are The 3 Azure Network Security (NSG) Rules Are – Learn IT And DevOps Daily
Get-Content c:\scripts\users.txt |New-MoveRequest -TargetDatabase MBXNAME1 -BadItem 40

 

The script reads the user names from a text file stored in c:\scripts\users.txt (make sure you create the file and type the names of the users)

 

Don’t forget the change the name of the target DB (MBX1)

 

Finally save the file as .PS1

 

Once done we need to schedule the task:

Create a task, Make sure that PowerShell is pointing to the script file (c:\script\move.ps1)

Schedule the Task:

Configure the script to run.

To make sure the script will run OK, you should have the script file and users file in one directory.