View Single Post
Old 11-11-2008   #4 (permalink)
Ripp


 
 

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 SpecsSystem Spec