Help convert GUID


i need convert objectguid format below:

12a24d81-2c95-11c2866f-017008d0a8f7

 

what have value in adsi edit beside objectguid attribute either hex, octel, decimal or binary.

 

 

chad

i have vbscript functions use convert various byte array attributes, such objectguid, readable formats linked here:

http://www.rlmueller.net/bytearrayfunctions.htm

for example, when read hex format of guid in adsi edit can convert in vbscript program with hexguidtodisplay function follows:

strhexguid = "6394351061438f4b82662379f7c4408e"  wscript.echo hexguidtodisplay(strhexguid)    function hexguidtodisplay(byval strhexguid)    ' function convert guid value in hex format display format.      dim tempguid, guidstr      guidstr = mid(strhexguid, 7, 2)    guidstr = guidstr & mid(strhexguid, 5, 2)    guidstr = guidstr & mid(strhexguid, 3, 2)    guidstr = guidstr & mid(strhexguid, 1, 2)    guidstr = guidstr & mid(strhexguid, 11, 2)    guidstr = guidstr & mid(strhexguid, 9, 2)    guidstr = guidstr & mid(strhexguid, 15, 2)    guidstr = guidstr & mid(strhexguid, 13, 2)    guidstr = guidstr & mid(strhexguid, 17)      tempguid = "{" & mid(guidstr, 1, 8) & "-" & mid(guidstr, 9, 4) _      & "-" & mid(guidstr, 13, 4) & "-" & mid(guidstr, 17, 4) _      & "-" & mid(guidstr, 21, 15) & "}"      hexguidtodisplay = tempguid    end function

 

richard mueller


mvp adsi


Windows Server  >  Windows Server General Forum



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...