Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Need to add an Exclusion to a Ex2010 mailbox PS script

$
0
0

Ok.. having a bit of a Powershell mind blank.

We have a script that moves mailboxes from Exchange 2003 to Exchange 2010 on a DB level.

However we need to exclude certain users from these moves due to certain conditions and they will be picked up later on.

Anyone know of a way to get the script to check against a list and exclude those mailboxes from the move.

Here is the {basic) script:

[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$database = [Microsoft.VisualBasic.Interaction]::InputBox("Source Exchange 2003 Database for moves i.e. KN2-XMB-P0009\XMB0009-MIGRATIONS\XMBMG1", "$env:database")

[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$targetdatabase= [Microsoft.VisualBasic.Interaction]::InputBox("Target Exchange 2010 Database for Moves i.e. KN2MBX0001-MB1", "$env:targetdatabase")

Get-Mailbox -database $database | New-MoveRequest -TargetDatabase $targetdatabase -BadItemLimit 10


Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>