Evening Folks,
edited for clarity
I have to get the Domain Controller GUID for a Certificate Request. I have a script that is provided by our CA that will generate the request and pull the GUID. what I don't understand is why their command produces a different GUID result from mine.
Their command
([guid]((([directoryservices.directorysearcher] "(distinguishedname=$DistinguishedName)").findall())[0].properties.getenumerator() | ? { $_.name -eq "objectguid"}).value[0]).ToString('N')
my command
Get-ADDomainController | Select ServerObjectGuid
They both provide a GUID that can be translated back to the Domain Controller, but what one is the "right" one?