Shut down computer without state saving


Is there a non-hacky way to achieve this using AppleScript? Theoretically, System Events offers such an option as described in its Dictionary:

shut down v : Shut Down the computer
shut down
[state saving preference boolean] : Is the user defined state saving preference followed?
If "state saving preference" is omitted or false, state is always saved.

But in practice, the parameter doesn’t seem to have an effect on any recent version of macOS.


OK, solved (after actually reading over what I posted).

Turns out, I’m an idiot, apparently. I’ve always interpreted the option to mean that executing

tell application "System Events" to shut down without state saving preference

would shut down without saving the state, when in reality you have to use

with state saving preference

to have it respect the user-set preference (which may be, not to save state)