Re: Script to reboot group of PCs
From: Mike [MSFT] (mikeva_at_online.microsoft.com)
Date: 10/14/04
- Next message: Marty List: "Re: Increment numeric part of string"
- Previous message: Douglas McIver: "Re: Script to reboot group of PCs"
- In reply to: Douglas McIver: "Re: Script to reboot group of PCs"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 17:31:59 -0700
TRY: Shutdown /?
/m = specify machine to shutdown
/r = reboot
/t = time to wait
/f = force shutdown (open unsaved data will be lost)
-- Thanks, Mike This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm Please do not send e-mail directly to this alias. This alias is for newsgroup purposes only. "Douglas McIver" <douglas@nospam.com> wrote in message news:%23ccc9NYsEHA.2808@TK2MSFTNGP14.phx.gbl... > What do all of those switches mean? > "Mike [MSFT]" <mikeva@online.microsoft.com> wrote in message > news:%236JlhmUsEHA.2516@TK2MSFTNGP11.phx.gbl... >> You could also do it with a single command line and use shutdown.exe that > in >> already in the OS. >> >> for /f %x in (machines.txt) do shutdown /m \\%x /r /t 0 /f >> >> Where machines.txt is a list of machine names or IP's you want to reboot. >> >> -- >> >> Thanks, >> Mike >> >> This posting is provided "AS IS" with no warranties, and confers no > rights. >> Use of any included script samples are subject to the terms specified at >> http://www.microsoft.com/info/cpyright.htm >> >> Please do not send e-mail directly to this alias. >> This alias is for newsgroup purposes only. >> >> >> "Douglas McIver" <douglas@nospam.com> wrote in message >> news:OMN9KuSsEHA.832@TK2MSFTNGP10.phx.gbl... >> > Thank you very much, I am going to try the PS Tools. >> > >> > Thanks! >> > Douglas >> > "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message >> > news:%234KOGoSsEHA.904@TK2MSFTNGP11.phx.gbl... >> >> Doug wrote: >> >> >> >> > Does anyone know of a simple vbs script that I can use to reboot a > list >> > of >> >> > PCs? I found the one at the bottom of this page, but it only >> >> > reboots >> > that >> >> > one PC. I would like to be able to put in multiple PC names. >> >> > >> >> > Thanks, >> >> > Douglas >> >> > >> >> > strComputer = "PCNAME" >> >> > Set objWMIService = GetObject("winmgmts:" _ >> >> > & "{impersonationLevel=impersonate,(Shutdown)}!\\" & _ >> >> > strComputer & "\root\cimv2") >> >> > Set colOperatingSystems = objWMIService.ExecQuery _ >> >> > ("Select * from Win32_OperatingSystem") >> >> > For Each objOperatingSystem in colOperatingSystems >> >> > ObjOperatingSystem.Reboot() >> >> > >> >> > >> >> Hi >> >> >> >> PsShutdown.exe in the free PsTools suite can take a file with computer >> >> names as input: >> >> >> >> http://www.sysinternals.com/ntw2k/freeware/pstools.shtml >> >> >> >> >> >> BeyondExec does also have the ability to shutdown groups of computers >> >> (multiple computer support is handled by multi-threaded routines >> >> speeding up the issuing of jobs): >> >> >> >> http://www.beyondlogic.org/consulting/remoteprocess/BeyondExec.htm >> >> >> >> >> >> >> >> -- >> >> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway >> >> Administration scripting examples and an ONLINE version of >> >> the 1328 page Scripting Guide: >> >> http://www.microsoft.com/technet/scriptcenter/default.mspx >> > >> > >> >> > >
- Next message: Marty List: "Re: Increment numeric part of string"
- Previous message: Douglas McIver: "Re: Script to reboot group of PCs"
- In reply to: Douglas McIver: "Re: Script to reboot group of PCs"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|