Search code examples
windowsactive-directorywindows-2000

How to get clientsitename and object status in windows 2000


As we know it's easy to get client site name in windows 2003 via WMI_NTdomain.clientsitename, object status by WMI_NTdomain.status , but that class doesn't exist in Windows 2000. So can you show me how to get those value by script or command line? My old system is still running well on windows 2000, i don't want to change it at now.


Solution

  • Grab HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters\DynamicSiteName with reg.exe, vbscript, or your favorite scripting/programing language.

    Edit: I admit that I haven't seen W2k for some time now. Does this VB Script output usefull information:

    option explicit
    
    dim adSys
    Set adSys = CreateObject("ADSystemInfo")
    
    WScript.Echo "SiteName=" & adSys.SiteName
    'WScript.Echo "Computername DN=" & adSys.ComputerName
    'WScript.Echo "Username DN=" & adSys.UserName
    'WScript.Echo "DomainDNSName (Comp)=" & adSys.DomainDNSName
    'WScript.Echo "DomainShortName (Comp)=" & adSys.DomainShortName
    'WScript.Echo "ForestDNSName (Comp)=" & adSys.ForestDNSName
    

    You could also use the WMI ScriptOMatic to search for the relevent class.