@horse Correct. For this case, I would use the first CN value of the distinguished name.
Notices by Steve Dinn (steve@social.dinn.ca), page 3
-
Embed this notice
Steve Dinn (steve@social.dinn.ca)'s status on Saturday, 22-Apr-2023 08:44:28 JST Steve Dinn -
Embed this notice
Steve Dinn (steve@social.dinn.ca)'s status on Saturday, 22-Apr-2023 08:39:10 JST Steve Dinn 1. Read the *dNSHostName* property - This doesn't always have a value
-
Embed this notice
Steve Dinn (steve@social.dinn.ca)'s status on Saturday, 22-Apr-2023 08:39:09 JST Steve Dinn 2. Read the *servicePrincipalName* property and take the longest value prefixed with "HOST/" that doesn't have any more /'s in it. - For objects with multiple "Host/" values, can you identify actual fully-qualified host name? I've noticed that DCs will have a "DNS/" SPN value, but that value is not present on workstations and member servers.
-
Embed this notice
Steve Dinn (steve@social.dinn.ca)'s status on Saturday, 22-Apr-2023 08:39:08 JST Steve Dinn 3. Take the first element of the distinguished name as the netbios name and return *DNS.GetHostEntry(netbiosName).HostName* - The name of the object in AD is not guaranteed to be the netbios name of the computer.
-
Embed this notice
Steve Dinn (steve@social.dinn.ca)'s status on Saturday, 22-Apr-2023 08:03:41 JST Steve Dinn @horse @lkarlslund That's a safe assumption. If it's not resolvable at all, I'll assume the machine isn't available.
-
Embed this notice
Steve Dinn (steve@social.dinn.ca)'s status on Saturday, 22-Apr-2023 07:35:22 JST Steve Dinn Question for all the Active Directory programmer nerds out there: If you have the distinguished name for a computer in AD and you need to resolve that to the computers fully-qualified host name, what's the best way to do that?
You might be tempted to say, "Duh, just read the dNSHostName property." but I have found that out in the wild, there are many computers that do not have this property set, so I'm trying to not make any assumptions about properties might be present.
I'm thinking that one of the following might be the best way, but I don't know which one (thread):
-
Embed this notice
Steve Dinn (steve@social.dinn.ca)'s status on Thursday, 26-Jan-2023 04:13:16 JST Steve Dinn @elk On Firefox on my laptop, I consistently get "ERROR: TypeError: NetworkError when attempting to fetch resource." when trying to log into my instance.
My instance seems fine: I can get to it in other apps, and via the web.
Other instances work.
Other browsers work
Other computers work.I've tried clearing my cache and cookies, using an incognito window, everything I can think of. Can you suggest something?