![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| Guest | Determine if reboot happened Hi, I'm running a script against a number of workstations and some workstations require a reboot. If i have to execute a reboot what do you guys recommend in determining if the machine actually took the reboot command? Would like to know if the reboot actually happened, something i should pull from the event log? Just looking for some ideas. Thanks! |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: Determine if reboot happened Right now i'm using the following code to issue a reboot: $workstationObj = Get-WmiObject Win32_OperatingSystem -computer ` workstationID $workstationObj.Reboot() But how do i know the actual workstation took the command, or didnt get hung up on an application or was locked up. Thanks "Ripp" wrote: Quote: > Hi, > > I'm running a script against a number of workstations and some workstations > require a reboot. If i have to execute a reboot what do you guys recommend > in determining if the machine actually took the reboot command? Would like > to know if the reboot actually happened, something i should pull from the > event log? Just looking for some ideas. > > Thanks! |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Determine if reboot happened On Nov 11, 10:52*am, Ripp <R...@xxxxxx> wrote: Quote: > Right now i'm using the following code to issue a reboot: > > $workstationObj = Get-WmiObject Win32_OperatingSystem -computer ` > workstationID > $workstationObj.Reboot() > > But how do i know the actual workstation took the command, or didnt get hung > up on an application or was locked up. > > Thanks > > "Ripp" wrote: Quote: > > Hi, Quote: > > I'm running a script against a number of workstations and some workstations > > require a reboot. *If i have to execute a reboot what do you guys recommend > > in determining if the machine actually took the reboot command? *Would like > > to know if the reboot actually happened, something i should pull from the > > event log? *Just looking for some ideas. Quote: > > Thanks! $wmiObject = gwmi Win32_PerfFormattedData_PerfOS_System -ComputerName $computer The 'SystemUptime' property will hold the seconds that the PC has been on since the last reboot or shutdown. |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Determine if reboot happened Thanks! will give it a try "Chris" wrote: Quote: > On Nov 11, 10:52 am, Ripp <R...@xxxxxx> wrote: Quote: > > Right now i'm using the following code to issue a reboot: > > > > $workstationObj = Get-WmiObject Win32_OperatingSystem -computer ` > > workstationID > > $workstationObj.Reboot() > > > > But how do i know the actual workstation took the command, or didnt get hung > > up on an application or was locked up. > > > > Thanks > > > > "Ripp" wrote: Quote: > > > Hi, Quote: > > > I'm running a script against a number of workstations and some workstations > > > require a reboot. If i have to execute a reboot what do you guys recommend > > > in determining if the machine actually took the reboot command? Would like > > > to know if the reboot actually happened, something i should pull from the > > > event log? Just looking for some ideas. Quote: > > > Thanks! > > $wmiObject = gwmi Win32_PerfFormattedData_PerfOS_System -ComputerName > $computer > > The 'SystemUptime' property will hold the seconds that the PC has been > on since the last reboot or shutdown. > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| determine app is 32 or 64 bit | PowerShell | |||
| determine if PC is on a certain network | VB Script | |||
| Determine PST Format | PowerShell | |||
| How to determine folder size | Vista General | |||
| API to determine if UAC is enabled? | Vista security | |||