query Exchange 5.5 Assoc-NT-Account attribute

  • Thread starter Thread starter steletroll
  • Start date Start date
S

steletroll

Hi,

i'm getting crazy...
I am in the process to migrate all my vbscripts to C#, but i can't
retrieve some attributes of mailboxes with DirectoryService
(particularly Assoc-NT-Account).

So if someone has a piece of code that show the primary Windows
Account (even just the hex SID) in C# or VB.NET, i will be the
happiest...

Thanks

Ste
 
I don't have 5.5 Exchange, so I'm not sure how it works. However, if you
can show the vbs, the C# or VB.NET is probably easy.

Generally, if the SID is stored in binary, you just need to do something
like:

byte[] data;
data = (byte[]) entry.Properties["Assoc-NT-Account"].Value;

That should give you the SID in binary format. From there, you can do what
you will with it (translate it to SDDL or hex string or whatever).

Joe K.
 

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

Back
Top