DirectoryEntry

  • Thread starter Thread starter James
  • Start date Start date
J

James

vb.net 2003

i extracted a user homemdb

Homemdb :
CN=607MB-SG1-MBS1-Std,CN=607MB-SG1,CN=InformationStore,C
N=D1SNX607MB,CN=Servers,CN=Second Administrative Group,CN=Administrative
Groups,
CN=xxx,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=xxx,DC=com

i would like only the "Storage grp" ie 607MB-SG1-MBS1-Std and the server it
resides , ie D1SNX607MB. I do not want so much data.

What is the schema properties for the excxhange fields above ? Or how do i
"substr" from the result above to get what i want?
 
Dear James,

Don't know if it will be generic for all your homemdb strings, but what you
can do to extract your wanted data is the following:

Put this algorithm in a private function (returning an string array or
similair):
1. Split your string into a stringarray where you split on the comma's.
2. Loop your stringarray to split each element in it where you split on the
'='
3. Store each 'value' (= behind the '=') in a new array and return this.

Now call this private function in a new class' (eg. HomeMDB) constructor
(constructor should take the HomeMDB string) and save the array as a member
variable. Now create properties in this class like StorageGrp and Server
which map to its corresponding element in the stored array.

Hope this helps,

Michel van den Berg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top