Active Directory Object GUID Conversion Larks!


What fun I have in the hotel of an evening! Gym, meal and then Active Directory object conversion larks and laughs! Here’s my latest evening escapade…

Let’s get the GUID of an Active Directory computer object.


$b = (Get-ADComputer -Identity "CN=HALOCLI1001,OU=Clients,DC=HALO,DC=NET").ObjectGUID

Capture180

 

Now, convert it to a byte array.


$c = $b.ToByteArray(); $c -join "", " "

Capture181

Capture176

 

Can you see how that matches the decimal representation in ADSI Edit?

 

Now, let’s convert it to hex and take a peek at ADSI Edit again.


[System.BitConverter]::ToString($c)

Capture182

Capture177

 

What a roller coaster of PowerShell exhilaration!

 

Comments (1)

  1. Willie Campbell says:

    Maybe you need a vacation 😉
    jokes apart, thank you for all the useful information you post

Skip to main content