Stop-service, wait, reboot


  • Good day all.  I would like to create a script that will stop a service, this service takes up to 15 minutes to stop, then once it is confirmed to be stopped, reboot the server. 

    Is it as simple as this?

    Stop-Service -Name appservice -Confirm Restart-Computer

    Friday, February 09, 2018 3:08 PM

All replies

  • Stop-Service will wait for the service to stop.  Just check for errors nd reboot.


    Friday, February 09, 2018 3:13 PM