A handful of powershell commands for finding out if databases are mounted or not.

Find the status of all the databases on a server:
Get-MailboxServer <servername>| Get-Mailboxdatabase -status | ft Name, Server, StorageGroup, Mounted -AutoSize

Find only the mounted databases on a server:
Get-MailboxServer <servername>| Get-Mailboxdatabase -status | where {$_.Mounted -eq $true} | ft Name, Server, StorageGroup, Mounted -AutoSize

Find only the dismounted databases on a server:
Get-MailboxServer <servername>| Get-Mailboxdatabase -status | where {$_.Mounted -ne $true} | ft Name, Server, StorageGroup, Mounted -AutoSize

Find all the dismounted databases in your environment:
Get-Mailboxdatabase -status | where {$_.Mounted -ne $true} | ft Name, Server, StorageGroup, Mounted -AutoSize

Find all the dismounted Public Folder databases in your environment:
Get-PublicFolderDatabase -status | where {$_.Mounted -ne $true} | ft Name, Server, StorageGroup, Mounted –AutoSize

-Thanks, Jinesh.

Advertisements