Last active
January 29, 2018 16:16
-
-
Save mallej/43cce9cd82a41bf055421731fb9560b6 to your computer and use it in GitHub Desktop.
[macOS - restart reboot] #macos #dialog #applescript #jamf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.jamf.com/jamf-nation/discussions/16614/reboot-machines#responseChild97418 | |
jamf reboot -minutes 10 -message "Your Mac will reboot in 10 minutes to maintain smooth working order. Please close any open work now to avoid data loss of unsaved documents." -background |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# shows macOS restart dialog window | |
# http://macscripter.net/viewtopic.php?pid=173582#p173582 | |
osascript -e 'tell app "loginwindow" to «event aevtrrst»' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.jamf.com/jamf-nation/discussions/26886/way-to-gracefully-restart-a-mac-from-the-jamfhelper-windows#responseChild159625 | |
# If you need to put a restart in your script, you can give it a slight delay and send it to a background process using something like: | |
shutdown -r +1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment