|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Batch Scheduled Shutdown of Workstations.using the shutdown command. shutdown /s /m \\%computer_name% /t 1 /c "Shuting Down" /f It works great if the workstation is on, it shuts it down very quickley and moves onto the next machine. But if a workstation is already switched off, then we get the error "The network path no found" But this takes over a minute to return this error, dramaticly slowing to whole process. Last night the batch process ran for 4 hours, and did not complete the whole list of 400 workstations. Any advise? Thanks Steve "Steve Audus, Chaucer BEC, Sheffield UK"
<SteveAudusChaucerBECSheffiel***@discussions.microsoft.com> wrote in message Show quoteHide quote news:C3E06778-6497-45CE-A2E3-B13E9D3218F8@microsoft.com... I have my machines write their machine name in a daily text file when they >I have scheduled the shutdown of all our schools XP workstations. > using the shutdown command. > > shutdown /s /m \\%computer_name% /t 1 /c "Shuting Down" /f > > It works great if the workstation is on, it shuts it down very quickley > and > moves onto the next machine. > > But if a workstation is already switched off, then we get the error > "The network path no found" > > But this takes over a minute to return this error, dramaticly slowing to > whole process. Last night the batch process ran for 4 hours, and did not > complete the whole list of 400 workstations. > > Any advise? > > Thanks > Steve boot up, and in another when they shut down. This way I can iterate through both lists at the end of the day to work out which machines are still on and need a remote shutdown. steve Very interesting, is there any chance of showing me an example of the
workstation scripting you use to do this? Thanks Steve <Steve Audus>; <Chaucer BEC>; "Sheffield UK"
<SteveAudusChaucerBECSheffiel***@discussions.microsoft.com> wrote in message Show quoteHide quote news:C3E06778-6497-45CE-A2E3-B13E9D3218F8@microsoft.com... You could do it like so:> I have scheduled the shutdown of all our schools XP workstations. > using the shutdown command. > > shutdown /s /m \\%computer_name% /t 1 /c "Shuting Down" /f > > It works great if the workstation is on, it shuts it down very quickley and > moves onto the next machine. > > But if a workstation is already switched off, then we get the error > "The network path no found" > > But this takes over a minute to return this error, dramaticly slowing to > whole process. Last night the batch process ran for 4 hours, and did not > complete the whole list of 400 workstations. > > Any advise? > > Thanks > Steve 1. Create a list of all IP addresses. This works only if you have fixed addresses. It does not work if you use DHCP. 2. Run this batch file: @echo off for /F %%a in (c:\IPAddresses.txt) do ( echo Processing %%a ping %%a -n 1 | find /i "bytes=" && shutdown /s /m \\%%a /t 1 /c "Shuting Down" /f ) Note that the "ping" line is a long line. It ends on "/f". Note also that you won't win the popularity contest with your extremely short warning time. Someone might be working late . . . I would make it 10 or 15 minutes. This looks the best method,
but isn't it possible to ping the DNS name of workstations as we use DHCP? Thanks for the help Steve <Steve Audus>; <Chaucer BEC>; "Sheffield UK"
<SteveAudusChaucerBECSheffiel***@discussions.microsoft.com> wrote in message news:FD318402-9727-4B4A-95C3-CD3B790E928D@microsoft.com... Yes, you can ping NetBIOS names but it takes much> This looks the best method, > but isn't it possible to ping the DNS name of workstations > as we use DHCP? > > Thanks for the help > > Steve longer to detect a PC that is turned off than if you ping it by IP addresses. You should consider Heb Martin's Task Scheduler solution - it wouild shut down all PCs at the same time.
Show quote
Hide quote
"Pegasus (MVP)" <I.***@fly.com> wrote in message Or maybe both of these. Do it from the scheduler and alsonews:uCNSi44dHHA.5044@TK2MSFTNGP05.phx.gbl... > > <Steve Audus>; <Chaucer BEC>; "Sheffield UK" > <SteveAudusChaucerBECSheffiel***@discussions.microsoft.com> wrote in > message > news:FD318402-9727-4B4A-95C3-CD3B790E928D@microsoft.com... >> This looks the best method, >> but isn't it possible to ping the DNS name of workstations >> as we use DHCP? >> >> Thanks for the help >> >> Steve > > Yes, you can ping NetBIOS names but it takes much > longer to detect a PC that is turned off than if you > ping it by IP addresses. You should consider Heb Martin's > Task Scheduler solution - it wouild shut down all PCs > at the same time. from the Ping-Batch so you get it either way. BTW, why are you shutting down computers? (We never do when it is at all avoidable. <grin>) Machines would stay on for years were it not for reboots after security patches etc. As it is, they stay on for weeks or months whenever we don't have those patches. Why not ping the workstation first (single ping) within the the script if
response ok then shutdown. Or set the schedule on all of the workstations that run a central batch file that has the shutdown script. "Steve Audus, Chaucer BEC, Sheffield UK" <SteveAudusChaucerBECSheffiel***@discussions.microsoft.com> wrote in message Show quoteHide quote news:C3E06778-6497-45CE-A2E3-B13E9D3218F8@microsoft.com... >I have scheduled the shutdown of all our schools XP workstations. > using the shutdown command. > > shutdown /s /m \\%computer_name% /t 1 /c "Shuting Down" /f > > It works great if the workstation is on, it shuts it down very quickley > and > moves onto the next machine. > > But if a workstation is already switched off, then we get the error > "The network path no found" > > But this takes over a minute to return this error, dramaticly slowing to > whole process. Last night the batch process ran for 4 hours, and did not > complete the whole list of 400 workstations. > > Any advise? > > Thanks > Steve "Phill" <p***@sedd.gotadsl.co.uk> wrote in message Using the scheduler on each workstation seems to be the safest,news:e7SdnbF5wtdcUInbnZ2dnUVZ8qqlnZ2d@pipex.net... > Why not ping the workstation first (single ping) within the the script if > response ok then shutdown. > Or set the schedule on all of the workstations that run a central batch > file that has the shutdown script. most reliable solution. Thank you for all your suggestions, a great help.
I am now using both methods very succesfully. The reason for shutting down our workstations is simple, to save energy. Thank you Steve Why not "start" each of these tasks so they run asynchronously ??? i.e., all the shutdowns happen simultaneously ...
Shutdown.cmd start shutdown /f /s /m \\junk0.domain.com ... start shutdown /f /s /m \\junk1.domain.com ... start shutdown /f /s /m \\junk2.domain.com ... Will run within a minute or so EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com To whom are you replying, and about what? Why did you change the subject
and start a new thread. Oh, I see...an Eggheader. <Steven> wrote in message news:2007420205451nospam@lifeoncottonwood.com... all the shutdowns happen simultaneously ...| Why not "start" each of these tasks so they run asynchronously ??? i.e., Show quoteHide quote | | Shutdown.cmd | | start shutdown /f /s /m \\junk0.domain.com ... | start shutdown /f /s /m \\junk1.domain.com ... | start shutdown /f /s /m \\junk2.domain.com ... | | Will run within a minute or so | | EggHeadCafe.com - .NET Developer Portal of Choice | http://www.eggheadcafe.com
Windows Time - No longer automatically updates
Domain Controller backup Windows Server 2003 SP2 and Canon Image Runner 3300 Can I modify logout times to a specific day? new server with same servername Security logs full of failed audits Virtual Server 2005 and Disaster Recovery question. NTBackup 2k3 GPO not applying to XP Pro Microsoft Virtual Server 2005 R2 |
|||||||||||||||||||||||