Monitoring Event Sink # 10 - How to Register Store Event Sink

Registering Store Event Sink - Three Sample attached

Example 1: The above command example is to register a specific mailbox. To register event sinks to a specific store with the regevent.vbs script, here is an example:

cscript regevent.vbs add OnSyncSave test.sink "file://./backofficestorage/contoso.com/MBX/SystemMailbox{9ADEA9EA-3924-401F-9C70-0 3B6B7378C9D}/StoreEvents/GlobalEvents/testsink" -m deep

In the above command, the event sink is actually registered to the system mailbox named SystemMailbox{GUID} in the mailbox store.

To determine the GUID:

1. In the Exchange System Manager, find the mailbox store that you want to register the event sink to.
2. Select the "Mailboxes" node under the mailbox store to see the list of its' mailboxes. You will see a mailbox called "SystemMailbox{GUID}." The GUID is the GUID you want.

Example 2 : The following example uses the RegEvent script to register an OnSyncSave event to a mailbox:

cscript regevent.vbs add OnSyncSave ExOleDB.ScriptEventSink.1 "file://./backofficestorage/contoso.com/user1/inbox/eventsink1" -m deep -file "c:\script1.vbs"

Example 3: The following example uses the regevent script to register an OnSave and OnDelete event to the public folder named folder1 under the Public Folders tree:

cscript regevent.vbs add "OnSave;OnDelete" ExOleDB.ScriptEventSink.1 "file://./backofficestorage/contoso.com/Public Folders/folder1/testsink" -m deep -file "c:\vbscript1.vbs"