I need to get machine SID (not computer account\'s SID) in C#. Computer is specified be host name, it is\'t necessarily local computer and it can be domain computer or workg
It appears that for most computers you do the following:
LookupAccountName("", "ComputerName", ...); ConvertSidToStringSid(...)
But for domain controllers you have to add a dollar sign to the computer name parameter, and then delete the last segment in the returned SID.