The
Status switch retrieves extra information about the databases. By default the cmdlet does not show
information about the Mounted status, BackupInProgress , and OnlineMaintenanceInProgress .
Including the Status switch takes extra processing, so scoping the storage group may speed up the
results.
This example retrieves the Mounted status for every database in the organization:
Get-MailboxDatabase -Status | ft Name, StorageGroup, Mounted
Removing Databases
The Remove-MailboxDatabase cmdlet removes the database object, but does not remove the actual
files. Before the cmdlet can be called, all users must be moved to another database or deleted.
Remove-MailboxDatabase -Identity < DatabaseIdParameter >
[-DomainController < Fqdn > ] [ < CommonParameters > ]
An example follows:Remove-MailboxDatabase -Identity ???mb100\First Storage
Group\mailbox database???
Managing Mailboxes
While most mailbox management is done with the Exchange Management Console, the ability to
perform bulk operations or make scripts to automate mailbox activities is easy with PowerShell.
Cmdlets discussed in this section are:
??‘ Remove-Mailbox
??‘ Disable-Mailbox
??‘ Get-MailboxStatistics
Chapter 8: Confi guring the Mailbox Server Role
223
??‘ Set-MailboxDatabase
??‘ Clean-MailboxDatabase
??‘ Connect-Mailbox
One common surprise for first time administrators using the management console is discovering that
the AD user object is deleted when they try to just remove the Exchange mailbox.
Pages:
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329