Okay, I inherited an Exchange 2007 server running on 2008 and I have users in the Disconnected Mailbox section and they have been there for more then the 30 day holding period. When I the following I get certain messages:
Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid
Shows all mailboxes but then I run
$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid
and get WARNING: The database '[servername]\Recovery Storage Group Test\[Mailbox]' to be accesses on server '[server name]' is not mounted or is not available.
I was hoping to get this so finish so the mailboxes would be in a var so I could run
$users | ForEach { Remove-Mailbox -Database "Mailbox Database" -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }
How would I go about...