Finding the GUID of an Exchange 2003 mailbox database
Thursday, November 27, 2008 at 0:00 We’ve just had an issue where we needed to know the GUID of a mailbox database on an Exchange 2003 server (in order to make a registry tweak in a hive named with the GUID and nothing which indicates the friendly name).
With Exchange 2007 it’s easy to do this using the Get-MailboxDatabase PowerShell cmdlet in the Exchange Management Shell:
Get-MailboxDatabase "Ex07Server\Storage Group 1\Mailbox Database 1" | Select Guid
However, if you try to do this against a database on Exchange 2003, you get an error from Get-MailboxDatabase saying the server is running Microsoft Exchange 2003 or earlier, which it doesn’t support.
You can use the Get-Mailbox cmdlet against an Exchange 2003 server though. This returns an object of the type Microsoft.Exchange.Data.Directory.Management.Mailbox and it has a Database property. If you output this property, using a formatting cmdlet on the Get-Mailbox, you’ll get the name of the database, but looking closer with Get-Member reveals that the Database property is not just the name, but an object, which you can get at with this:
(get-mailbox -database "Ex03Server\Storage Group 1\Mailbox Database 1" | select -first 1).database
This doesn’t give you quite as much as Get-MailboxDatabase does for an Exchange 2007 database, but it does include an ObjectGuid property, which was exactly what we needed to identify the correct hive in the registry on the Exchange 2003 server.




Reader Comments