See also the 'ping' and 'shutdown' UDFs. However, much faster would be
code:
$TimeofDay = val(split(@TIME,':')[0])
if $$TimeofDay<22 or $TimeofDay>23
exit 0
endif
$comps=netview2()
for each $comp in $comps
if $comp<>@WKSTA
$rc=shutdown($comp,'"Shutdown in 30 Seconds',30,1,2)
if @error
$offline=$offline+1
else
$online=$online+1
endif
endif
next
? 'Computers already offline :'+$offline
? 'Computers online (SHUTDOWN) :'+$online
$rc=shutdown(@WKSTA,'"Shutdown in 30 Seconds',30,1,2)
exit 0

This will shutdown all computers in the domain including the computer that the script runs from. Use at your own risk. NetView2() is a UDF from the uDF Forum.
_________________________
There are two types of vessels, submarines and targets.