I am using the Windows Update API to update a bunch of VM’s. With Windows Update comes the inevitable reboots. Can anyone think of a way that I could tell from a remote server if the windows box has indeed finished its reboot? All ideas or thoughts would appreciated.
Because the VM’s are in Lab Manager and using a fenced configuration, WMI will not work, and although I thought about using the VM to send a signal when it was back up. There would have been no way to reliably know who to notify as the app waiting for the machine could be on any number of machines so it just didn’t seem reasonable. However time is not essential (and even though I know this will bite me sometime when a Service Pack comes down) I have had good success with the PING and then wait 5 minutes so far, so I am going to use that for now. If I run into exceptions I will then try to implement the VM notfiying the world when it comes back up. Thanks to all.
Just wait for it to respond to a ping.
In light of your comments:
1 – Use this script
2 – If you get any errors with that script, follow these instructions.
Other Answer 1:
Check for this event in the event log:
Event Type: Information
Event Source: EventLog
Event Category: None
Event ID: 6005
Time: 12:56:24 PM
The Event log service was started.
Other Answer 2:
A more general version of this question is How do I know if a system has powered on?
Other Answer 3:
The reality is that you can’t know when it is done booting. The boot process is pretty asynchronous and so whatever criteria you use to determine that it is done “booting” could happen before something else completes.
What I would recommend is determine what you actually want to know. What specifically is it you are waiting for? Find a way to determine whether this has taken place and forget worrying about “booting”.
If you just need to know that the machine is back up but maybe hasn’t completed all of the post-boot loading, put something in the startup sequence or a service that signals your code. When this signal takes place, take whatever action you need to.
Other Answer 4:
You could install a startup program or service on the machine to send an email or some type of network based posting everytime it restarts.