This project has moved and is read-only. For the latest updates, please go here.

Restart-Computer Suggestion/Question

Topics: Feature Requests, Feedback
Feb 21, 2014 at 11:06 PM
Why doesn't the script (while installing remotely) utilize the 'Restart-Computer -Wait' command to continue the script after a restart is needed on a remote server in order to keep the install logs on the initiating computer instead of just relying on run once?
Jul 22, 2014 at 10:06 AM
I agree, this would be nice. It will require at least PowerShell 3 though:
Beginning in Windows PowerShell 3.0, you can wait for the restart to complete before running the next command, specify a waiting timeout and query interval, and wait for particular services to be available on the restarted computer. This feature makes it practical to use Restart-Computer in scripts and functions.
Restart-Computer on TechNet