What’s the first thing you, as an IT professional, ask a customer who is experiencing a technical issue? Let us guess… “Did you try restarting your device?” Does your customer roll their eyes and say yes, only to then go ahead and try restarting again at your insistence and then suddenly the issue is gone?
Want to solve the eye-roll problem AND the reboot problem at the same time?
Boy, do we have the script for you. The below script lets you shut down or restart both local and remote devices one at a time. This can be super useful when you want to restart a device after running an installation script — plus it runs on all Windows versions, including Windows 11!
Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *
Shutdown /r /f
Frequently asked questions
Will data from running programs be lost if I force restart the device?
Can I set a device to restart at a specific time?
- /r command automatically restarts the computer after shutdown.
- /f command forces running applications to close — without warning the user — which may result in data loss.
- Shutdown /r /f command will shutdown the device, force running applications to close, and restart the device after shutdown.
- /m \\<computername> Add this command to the script to target remote computers
- /t <xx> Add this command to the script to set a countdown (measured in seconds) until the device restarts. For example, /t 0 will instantly restart the device whereas /t 20 will restart the device in 20 seconds.