#MATLAB, 11 bytes
MATLAB, 11 bytes
!shutdown/p
Somewhat similar to Stewie Griffin's approach. However, MATLAB has way shorter ways of invoking system commands; in this case, !
is used. Windows does not need .exe
for command names, so that's left out as well. The /
option is still supported (I'm running Windows 10), and negates the need for the space. Alternatives are:
system shutdown/p % 17 bytes; uses so-called 'command' syntax.
dos shutdown/p % 14 bytes; the 'dos' command can be used just as well.