0

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.

SieuTruc
  • 475
  • 1
  • 7
  • 16

1 Answers1

0

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.

Daro
  • 1,990
  • 2
  • 16
  • 22
  • no, it doesn't exist, i find another place HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters\installedsitename But about the object status (WMI_NTdomain.status), do you know where it is ? – SieuTruc Oct 02 '12 at 08:53
  • yeah, that' i want. Thanks, if you have a little time, i don' find any object equivalent to WMI_NTdomain.status, it seems to lack on windows 2000. – SieuTruc Oct 02 '12 at 21:07
  • If it must be WMI, you could run the VB script via WMI and get the output. – Daro Oct 03 '12 at 08:27