how to determine which systems is offline

  • Thread starter Thread starter m
  • Start date Start date
M

m

Hello,

Is there a tool or a script out there that I can run to
identify which workstations is turn off?
Is the option come with active directory? I remember on
the formal NT4.O DC the workstations for servers in the
Server Manager will be gray out if the system is offline.

Thank you!

M
 
Hello,

Is there a tool or a script out there that I can run to
identify which workstations is turn off?
Is the option come with active directory? I remember on
the formal NT4.O DC the workstations for servers in the
Server Manager will be gray out if the system is offline.

Thank you!

M

Try the following batch:

@echo off
If {%1}=={} @echo Syntax: offline YourNetBIOSDomainName&goto :EOF
setlocal
set command=netdom query /domain:%1 WORKSTATION
For /f "Skip=1 Tokens=1" %%i in ('%command%') do call :contact %%i
endlocal
goto :EOF
:contact
set computer=%1
if "%computer%" EQU "The" goto :EOF
set reply=N
for /f "Skip=2 Tokens=1" %%p in ('@ping -n 1 %computer%') do (
if /i "%%p" EQU "Reply" set reply=Y
)
if "%reply%" EQU "Y" goto :EOF
@echo %computer% is offline.


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top