Hi,

Just a quick tip on how to move a collection of mailboxes based on the time someone last logged into the mailbox. This could be useful if you had mailbox database that only held inactive mailboxes before they were later deleted.

So the EMC command is…

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.LastLogonTime -lt “<DateYouWantToTarget>”} | Get-Mailbox | New-MoveRequest -TargetDatabase “<DatabaseName>”

If you want to know which mailboxes that would include add a -WhatIf to the end of the command and you’ll get a list of the move requests that would have been created, i.e.

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.LastLogonTime -lt “<DateYouWantToTarget>”} | Get-Mailbox | New-MoveRequest -TargetDatabase “<DatabaseName>” -WhatIf

Here’s an example, it will get mailboxes that haven’t logged in since before the 1st Jan 2013 and will move create move requests to move them to a database named Database1

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.LastLogonTime -lt “01/01/2013”} | Get-Mailbox | New-MoveRequest -TargetDatabase “Database1”

N3ilb