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
Now, convert it to a byte array.
$c = $b.ToByteArray(); $c -join "", " "
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.
What a roller coaster of PowerShell exhilaration!