Netbios Domain Name

(imported topic written by nmelanson91)

I am looking to bring back the Pre-Windows 2000 Domain name/Netbios Domain name of a machine. I have looked at the WMI scripts and only found the way to bring back the FQDN domain name. Has anyone been able to just bring back the machine domain name?

(imported comment written by BenKus)

Hello,

This will return the netbios name for computers not in an active directory domain:

if (exists wmi) then (string values of selects “Domain from Win32_ComputerSystem” of wmi) else (“N/A”)

I don’t know how to get the domain name from an AD computer… other than just taking the first part of the fqdn:

if (exists wmi) then (preceding text of first “.” of string value of selects “Domain from Win32_ComputerSystem” of wmi) else (“N/A”)

Ben

(imported comment written by nmelanson91)

I was actually able to find this in the registry under HKLM\Software\Microsoft\Windows NT\WINLOGON the CachedPrimaryDomain shows the short domain name.