SCRIPT: Get Store GUIDs

by Bharat Suneja

Background: Exchange Server 2003 SP2 allows raising the Store size limit. If you’re using Exchange Server 2003 Standard Edition, the default is raised from 16 Gb to 18 Gb, and the maximum size of a Store has been raised to 75 Gb. To raise the Store size limit, you need to insert the Database Size Limit DWORD value in:
HKLM\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<servername>\Private-
(Refer to “Database Size Limit Configuration and Management“, Exchange Server 2003 Technical Reference Guide)

Issue: You want to raise the storage limit of a Store.

When you open the Registry Editor, you find the name of the subkey looks something like this:
Private-e633bea6-9daf-4752-b5a9-efffae29af2b
Store GUID in registry

When you check the objectGUID attribute of a Store (in ADSIEdit), it looks like this:
A6 BE 33 E6 AF 9D 52 47 B5 A9 EF FF AE 29 AF 2B
Store GUID as displayed by ADSIEdit

The objectGUID is an octet string – the octets will appear reversed.

One way of finding out the GUID is to go to the Microsoft Exchange System Objects container, find the SystemMailbox{GUID} object – where the GUID matches the registry subkey, and check the object’s homeMDB attribute. This reveals the name of the Store that GUID belongs to. There should be a simpler way to do this!

Here’s a script— GetStoreGUIDs.vbs, that will make it easier. It dumps the Store name, the distinguishedName, objectGUID (in a readable format, the way it shows up in the registry), and the legacyExchangeDN of all Stores in an Exchange Organization.

File: GetStoreGUIDs.zip

Additional Download: Besides the above script, you will also need to download and register a Microsoft DLL file that helps convert the data types (variants).
Download ArrayConvert.exe from KB 250344: SAMPLE: ARRAYCONVERT.EXE Variant Conversion Functions.
– Expand ArrayConvert.exe into a folder
– Navigate to the folder where you expanded the files
– Use the following command to register the DLL on the computer that you’ll run the script on:
Regsvr32 ADS.DLL

UPDATES
3/4/2006: Script shows Organization name, Store type (Public/Private) and Server name.
12/27/2006: Added link to Database Size Limit Configuration and Management, and images showing GUID in registry and ADSIEdit.

8/7/2007: Note about downloading ArrayConvert.exe and registering ADS.DLL added.

{ 16 comments… read them below or add one }

Anonymous March 31, 2006 at 10:58 pm

Thanks for posting these great scripts on your blog – this makes it easier for a lot of us.

Reply

Anonymous April 14, 2006 at 2:24 pm

Spent some time trying to figure this one out. Your script made it so easy! Thanks – and awesome blog!

Reply

Anonymous July 31, 2006 at 8:43 am

The download link does not work. Can anyone repost the link?

Thanks

Reply

Anonymous December 19, 2006 at 11:59 am

It says the script output for objectGUID will be displayed “the way it shows up in the registry”. What did I do wrong if the script output for the GUID is an octet string, or reversed?

Reply

Bharat Suneja December 19, 2006 at 12:21 pm

What I meant in the post is – it’s hard to find out which GUID corresponds to a particular Store from the registry (if you have multiple Stores), and when you actually take a look at the objectGUID attribute of the actual Store that you want to modify the limits for, it doesn’t look like what shows up in the registry.

The script lists Stores and the corresponding GUID that you can then look for in the registry and modify the size easily.

Is the script not producing the right output? You can email me offline (firstname lastname at hotmail) to tell me what you see in the registry, and what the objectGUID attribute of your Store(s) shows.

Reply

Michael Bendtsen April 2, 2008 at 4:05 am

Hi

I’m having trouble using you code.

I’m searching for the Store GUID and with your tool i get this:
{A9C5C707-29FF-1745-8B94-F76E9565AC49}

If I use LDP.EXE and looks at the mailbox store and the property objectGUID it is:
{07c7c5a9-ff29-4517-8b94-f76e9565ac49}

Do you have any idea of what could cause the problem?

If I try to get the objectGUID it is displaying “?????|?????”

Reply

Anonymous May 23, 2008 at 11:26 am

Outstanding script. Thank you, thank you.

Reply

Nick May 9, 2009 at 11:16 am

I am sorry, but when I run the script, it shows:

Mail Box GUID: 43bad154a0a128408a58ae1c48d5d4e2

But when I traverse to the registry branch:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\SERVER

I have three “private” folders:
Private-54d1ba43-a1a0-4028-8a58-ae1c48d5d4e2
Private-826060a6-7e99-4203-9a49-91eaaa6eba31
Private-f0d6e9f6-2060-4619-a90d-fc8ca29fde0d

well? which one is it?

Nick

Reply

Bharat Suneja May 9, 2009 at 11:44 am

@Nick: The first one in your list.

Reply

Anonymous September 11, 2009 at 1:40 pm

I found this article, but didn't download the script. I searched hte MS Exchange System Objects folder and found it. I was lost until I found this article. It saved me a lot of time.

Thanks a lot for the post!!

Reply

Anonymous November 24, 2009 at 12:18 pm

I get:

C:\ArrayConvert\getStoreGUIDs.vbs(34, 6) Provider: Table does not exist.

Any thoughts as to the issue?

Reply

mC August 11, 2010 at 10:32 am

I get the same on 1 out of 50 servers (on 50 different domains). I suspect the Table does not exist is occuring because there are 2 domains in the forest.. and it doesnt know which one to query..

Reply

Anthony August 3, 2011 at 2:24 pm

Some of the Octets are Reverse, you need to parse the string at the end and reverse them…. this is what i did…

strstorename=”Private-“& Mid(strtmp,7,2) & Mid(strtmp,5,2) & Mid(strtmp,3,2) & Mid(strtmp,1,2) & “-” & Mid(strtmp,11,2) & Mid(strtmp,9,2) & “-” & Mid(strtmp,15,2) & Mid(strtmp,13,2) & “-” & Mid(strtmp,17,4) & “-” & Mid(strtmp,21,len(strtmp)-20)

Reply

Cad March 7, 2012 at 1:25 pm

I get this error after running it:

getstoreguids.vbs(62, 1) Microsoft VBScript runtime error: Active X component can’t create object: ‘ADs.ArrayConvert’

Reply

Bharat Suneja March 7, 2012 at 2:00 pm

Did you download ArrayConvert.exe from KB 250344: SAMPLE: ARRAYCONVERT.EXE Variant Conversion Functions, expand it and register ADS.DLL as shown in the post?

Reply

Justin September 20, 2013 at 9:55 am

sadly I get the ‘getstoreguids.vbs(62, 1) Microsoft VBScript runtime error: Active X component can’t create object: ‘ADs.ArrayConvert’’ error too.

I did successfully register ads.sll

Reply

Leave a Comment

Previous post:

Next post: