Link to home
Start Free TrialLog in
Avatar of davidsummers
davidsummers

asked on

Convert Hex SID to Dec SID

I have a quick but relatively complex question
 
Environment - Native Mode, Win 2000 Active Directory.
 
I am looking for a method to convert an active directory HEX value of a User's SID into is Decimal value
 
For example a user account value in the registry can be displayed as S-1-5-21-1390067357-484763869-1801674531-3404 as it's Decimal value or 15 15 52 da be 9d 1c e4 e8 dd 6b 63 5f 23 d4 c as it's HEX Value.
 
What I would like to achieve is a way to convert between the 2, using script. That way I can setup a scrip to 1st Poll a resource to gain the HEX value of a SID and then resolve that to the DEC value so that I can compare it against another Resource.
 
If there is any function in either VBScript, WMI, WSH or ADSI that would be beneficial.
Avatar of graye
graye
Flag of United States of America image

I'd be difficult to represent the HEX version of a SID in a script in anything other than a string.   Where are you getting this SID from?

I'd be a rather simple task to write a small application that translated a string of hex values into a SID-formated string.  I'll write you one...
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial