Shutdown

Verb: shutdown

Closes the current system session using the selected option.

Syntax

shutdown --mode(ShutdownMode)

Inputs

Script Designer Required AcceptedTypes Description
--mode Command Type Required ShutdownMode Option indicating how the current system session should be closed.
  • Lock
  • Logoff
  • Reboot
  • Shutdown
  • Example

    Example 1: The command shuts down the machine using the Command Type parameter as Shutdown.

    shutdown --mode "Lock"
    

    Example 2: The command restarts the machine using the Command Type parameter as Reboot.

    shutdown --mode "Reboot"
    

    Example 3: The command ends the user session, currently connected to the machine, using the Command Type parameter as Logoff.

    shutdown --mode "LogOff"
    

    Example 4: The command blocks the user session, currently connected to the machine, using the parameter Command Type as Lock.

    shutdown --mode "Lock"
    

    See Also

  • Check If Virtual Machine
  • Count Monitors
  • Get Display Devices
  • Get Screen Resolution
  • Get System Folder Path
  • Lock the Machine
  • Logoff
  • Run
  • Set Screen Resolution