Re: Remote Shutdown Batch Script
From: Pegasus \(MVP\) (I.can_at_fly.com)
Date: 10/23/04
- Next message: Pegasus \(MVP\): "Re: w2k server - limited free disk space"
- Previous message: Dave Leonardi: "Remote Shutdown Batch Script"
- In reply to: Dave Leonardi: "Remote Shutdown Batch Script"
- Next in thread: Dave Leonardi: "Re: Remote Shutdown Batch Script"
- Reply: Dave Leonardi: "Re: Remote Shutdown Batch Script"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 24 Oct 2004 08:56:03 +1000
"Dave Leonardi" <Cyberaccount72@yahoo.com> wrote in message
news:ueZqGlUuEHA.3200@TK2MSFTNGP09.phx.gbl...
> Good Afternoon,
>
> I had a question concerning the creation of a DOS batch or Windows
> script file, which can shutdown computers that remain on at night. I need
> for this to happen due to the fact that I have SUS pushing out updates and
> some users tend to leave their computers on with no restarts. I have
three
> sites to manage and end users forget to turn them off quite frequently. I
> would like to automate a shutdown using a task scheduled on the server to
> run a batch at night around 10:00 PM. I have no problem setting up the
> Scheduled Task, It's the actual batch structure I am having difficulty
with.
> I was considering redirecting computer names from a Domain text list into
a
> batch that would execute the Shutdown -m \\ Remote Computer ( with
> parameters). This way all computers that are left on can be automatically
> shutdown with no interference to the end user. If someone could offer help
> or a better way to approach this, it would be greatly appreciated. Thank
you
> for your time.
>
> Windows 2003 Domain
> Windows XP Pro/ 2000 Clients
>
>
>
> Regards,
>
>
> David Leonardi
>
>
Put your computer names into c:\PCs.txt, then run this batch file:
@echo off
for /F %%a in (c:\PCs.txt) do call :Sub %%a
goto :eof
:Sub
echo Shutting down %1
ping %1 -n 1 | find /i "bytes=" > nul && c:\tools\shutdown \\%1 /.. /.. /..
- Next message: Pegasus \(MVP\): "Re: w2k server - limited free disk space"
- Previous message: Dave Leonardi: "Remote Shutdown Batch Script"
- In reply to: Dave Leonardi: "Remote Shutdown Batch Script"
- Next in thread: Dave Leonardi: "Re: Remote Shutdown Batch Script"
- Reply: Dave Leonardi: "Re: Remote Shutdown Batch Script"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|