Thursday, 19 March 2009

To Mount Or Not To Mount?

This question came up recently and it reminded me that I, too, had recently forgotten how to do this. Consider the scenario where you are trying to determine, via Exchange Management Shell, whether the databases are mounted or not. Ordinarily you'd run a cmdlet such as:

Get-MailboxDatabase fl

This returns all properties for a mailbox database, of which there are quite a few. You can filter the output to return only properties containing the string 'mount':

Get-MailboxDatabase fl *mount*

As you can see from the text below, this returns us the MountAtStartup and Mounted properties:

MountAtStartup : True
Mounted :

However, you will notice that the Mounted property has no value. To determine whether the database is actually mounted or not, use the -Status parameter. I've also included the filter to show the name of the database as there are 5 databases on this test system:

Get-MailboxDatabase -Status fl name,*mount*

Name : SG1DB(E2K7)
MountAtStartup : True
Mounted : True

Name : SG2DB(E2K7)
MountAtStartup : True
Mounted : False

Name : SG3DB(E2K7)
MountAtStartup : True
Mounted : False

Name : SG4DB(E2K7)
MountAtStartup : True
Mounted : False

Name : SG5DB(E2K7)
MountAtStartup : True
Mounted : False

No comments: