Quantcast
Viewing all articles
Browse latest Browse all 19214

Custom PS for mailbox move-request operation

Hello all,

With this ps

$mbxs = Get-Mailbox -database “User-AZ” | select -first 100 

$dbs = “User-AZ-1″,”User-AZ-2″,”User-AZ-3″ 

foreach ($n in 0..($mbxs.count -1)){ 

New-MoveRequest $mbxs[$n] -TargetDatabase $dbs[($n%3)] -BadItemLimit ’10′ } 

i can select a specific database and move some of mailbox to others ( somehow disseminating)

In addition to this I need a more custom ps as written below.

-scan all mailbox databases for mailbox counts

-If a mailbox database has more than 100 mailboxes (for example 122 mailboxes), move first 22 to another suitable mailbox database ( in my environment --> a suitable database is a regular database which contains less than 100 mailboxes ) 

Thank you for you further assistance.

regards.




Viewing all articles
Browse latest Browse all 19214

Trending Articles