With native Windows 2000 commands:
NETDOM QUERY /D:MyDomain WORKSTATION NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM.
With native Windows 2000 commands:
NETDOM QUERY /D:MyDomain WORKSTATION NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM.
With native Windows 2000 commands:
NETDOM /DOMAIN:MyDomain MEMBER \\computer2Bdeleted /DELETE NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM.
Sounds familiar?
With (native) Windows XP Professional or Windows Server 2003 commands:
FOR /F %%A IN (servers.txt) DO (
WMIC /Node:%%A LogicalDisk Where DriveType="3" Get DeviceID,FileSystem,FreeSpace,Size /Format:csv | MORE /E +2 >> SRVSPACE.CSV
)
The only prerequisites are:
The CSV file format is ServerName,DeviceID,FileSystem,FreeSpace,Size (one line for each harddisk partition on each server).
If you have a strict server naming convention, SERVERS.TXT itself can be generated with the NET command:
FOR /F "delims=\ " %%A IN ('NET VIEW ^| FINDSTR /R /B /C:"\\\\SRV\-"') DO (>>SERVERS.TXT ECHO.%%A) | Notes: | (1) | assuming server names start with "SRV-"; modify to match your own naming convention. |
| (2) | delims is a backslash, followed by a tab and a space. |
With native Windows 2000 commands:
NETDOM QUERY /D:MyDomain PDC or, to find the FSMO with (native) Windows Server 2003 commands (Active Directory only):
NETDOM QUERY /D:mydomain.com FSMO NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM.
With native Windows 2000 commands:
NETDOM QUERY /D:MyDomain SERVER NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM.
With the native NET command:
NET VIEW or, to list the names only:
FOR /F "skip=3 delims=\ " %%A IN ('NET VIEW') DO ECHO.%%A delims is a backslash, followed by a tab and a space.
With native Windows 2000 commands:
NETDOM QUERY /D:MyDomain DC NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM.
With (native) Windows Server 2003 commands (Active Directory only):
DSQUERY Server or, if you prefer host names only (tip by Jim Christian Flatin):
DSQUERY Server -o rdn