North East Bytes - a Microsoft technology usergroup in North East England.

Tweets

Powered by Squarespace

« Windows Live Wave 3 Online Services Launch | Main | New Xperia Panels »
Thursday
Nov272008

Finding the GUID of an Exchange 2003 mailbox database

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.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>