PC Review


Reply
Thread Tools Rate Thread

remote shutdown multiple workstations

 
 
=?Utf-8?B?ZGF2aWQgY2FydmFsaG8=?=
Guest
Posts: n/a
 
      19th Dec 2006
Hi !
I'm using a dos shell script to remotely shutdown my workstations daily with
the command:
shutdown /s /m \\ip.address /t 60 /d 0:0 /c "daily shutdown".
The problem is that I one line for each workstation, and if one of them is
off, or not connected at that time, the script has to wait before shuting
down the next.
Is there a way of doing this simultaneally ?
Thanks !
 
Reply With Quote
 
 
 
 
Shenan Stanley
Guest
Posts: n/a
 
      19th Dec 2006
david carvalho wrote:
> Hi !
> I'm using a dos shell script to remotely shutdown my workstations
> daily with the command:
> shutdown /s /m \\ip.address /t 60 /d 0:0 /c "daily shutdown".
> The problem is that I one line for each workstation, and if one of
> them is off, or not connected at that time, the script has to wait
> before shuting down the next.
> Is there a way of doing this simultaneally ?


This batch script:

for /f %%u in (listofcomputers.txt) do (
start shutdown.exe -s -m \\%%u -f -t 60 -d 0:0 -c "daily shutdown"
)

And then have your list of machine names/ips in the given text file, one
name/ip per line.

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html


 
Reply With Quote
 
 
 
 
Nipi
Guest
Posts: n/a
 
      19th Dec 2006
Hi
What is the /f in front of "for", is it what it tells the batch not to
wait for each workstation?


Shenan Stanley wrote:
> david carvalho wrote:
> > Hi !
> > I'm using a dos shell script to remotely shutdown my workstations
> > daily with the command:
> > shutdown /s /m \\ip.address /t 60 /d 0:0 /c "daily shutdown".
> > The problem is that I one line for each workstation, and if one of
> > them is off, or not connected at that time, the script has to wait
> > before shuting down the next.
> > Is there a way of doing this simultaneally ?

>
> This batch script:
>
> for /f %%u in (listofcomputers.txt) do (
> start shutdown.exe -s -m \\%%u -f -t 60 -d 0:0 -c "daily shutdown"
> )
>
> And then have your list of machine names/ips in the given text file, one
> name/ip per line.
>
> --
> Shenan Stanley
> MS-MVP
> --
> How To Ask Questions The Smart Way
> http://www.catb.org/~esr/faqs/smart-questions.html


 
Reply With Quote
 
Shenan Stanley
Guest
Posts: n/a
 
      19th Dec 2006
david carvalho wrote:
> I'm using a dos shell script to remotely shutdown my workstations
> daily with the command:
>
> shutdown /s /m \\ip.address /t 60 /d 0:0 /c "daily shutdown".
>
> The problem is that I one line for each workstation, and if one of
> them is off, or not connected at that time, the script has to wait
> before shuting down the next.
> Is there a way of doing this simultaneausly?


Nipi wrote:
> What is the /f in front of "for", is it what it tells the batch not
> to wait for each workstation?


for /f --> command to process files line-by-line
/F breaks up the line at each blank space, and any blank lines are
skipped...

See:
http://www.ss64.com/nt/for_f.html

The 'start' is what opens up a new process for each new line - thus there is
no waiting - as you have generated a new process for each entry in the text
file.

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard/remote connect no longer respond-multiple workstations Jay Windows XP General 0 22nd Dec 2008 09:03 PM
Remote shutdown workstations Emyeu Microsoft Windows 2000 5 20th Apr 2005 04:50 AM
Shutdown multiple workstations =?Utf-8?B?V2luMmtBbWluIFJvb2tpZQ==?= Microsoft Windows 2000 2 25th May 2004 02:44 PM
remote application start, remote shutdown, remote dialogue Hansi Microsoft Dot NET 0 20th Nov 2003 10:49 AM
can i schedule multiple workstations to shutdown at specific time? zetaplus Microsoft Windows 2000 Group Policy 1 16th Sep 2003 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:28 AM.