Posted March 18, 20214 yr I've been experimenting with a scheduled task to restart some machines based on scope and I've had mixed success. Some machines in the scope restart as scheduled some don't. My powershell skills are limited so right now the pulseway script that I created to do restarts just has the powershell command Restart-Computer. Should there be more?
March 18, 20214 yr Are the machines that are failing to restart, failing because they have some processes open that they cannot close (or are awaiting user input)? You could always append "-force" to your restart-computer cmdlet to force it.
March 22, 20214 yr I use it regularly, and the command (as WYE suggested) Restart-Computer -Force How do you manage the scheduled restarts? with a scheduled task and Tags? I went through a few options to get this to work. I went with a Tag called 'Restart Tomorrow' and at 6am, any devices with that tag are captured in a task that restarts the server. The tag is removed on reboot.
Create an account or sign in to comment