Post navigation

Convert a mailbox GUID to the user and display name

If certain MAPI limits are reached when working with sessions, items, attachments, etc., Exchange will deny further access to that user to that object type. When this happens event ID 9646 is logged in the Application log. The description of the event contains a mailbox GUID that is causing the issue, but the GUID alone does nothing to indicate what user/mailbox is affected.

Microsoft KB 899663 instructs how to manually transpose GUID into a format that can be used in an LDAP filter so that you can search for a match. Why do all this by hand when a script can do it for you? I took an existing script I had that already does the transposition and added an AD search to return the matching dn. The dn is passed to a name translation function that converts the dn to the NT4 format (domain\username) and displays the match with username and display name.

In addition to the VBScript file, I have also included a compiled version that uses SAPIEN Script Host as the engine. This is a self-contained, runs-in-memory-only, no-DOS-box-comes-up engine from PrimalScript. Running the compiled version is nice since you don’t have to ensure that CScript is the default host and no DOS box appears while the script is running.