How to Shutdown, Restart, or Log off Windows Using Keyboard Shortcuts

Jon Fisher

How-to-Shutdown,-Restart,-or-Logoff-Using-Keyboard-Shortcuts

I often restart my computer to complete software installations or Windows updates. It’s not normally a hassle to open the start menu and choose to restart, but there is a much simpler way to do so. We’ve looked at the native Windows 8 shortcuts as well as those found in Windows 7. However, we can also create our own shortcuts for unique purposes.

The shortcuts we’ll be making today involve shutting down, restarting, logging off, hibernating, and switching a user account. We’ll make shortcuts to these commands and then assign a unique keyboard combination to each of them to make launching them really easy. No longer will you need to open the start menu to perform these particular operations. Simply enter your key combo and you’ll be on your way.

Using the Shutdown Command from the Command Line

There are plenty of switches that can be used with the shutdown command, as you can see here with shutdown /?:

Shutdown-/?-options-in-the-command-prompt

Any of these commands can be run right from the command prompt. For example, enter shutdown /L to logoff.

Or you could open the graphical interface for shutting down and restarting using the shutdown /i command. Though, this GUI is limited to only two commands.

Use-the-shutdown-GUI-with-shutdown-/i

However, to quickly and easily shutdown or restart, a shortcut can be made to these operations that can then be associated with a shortcut key. Enter the shortcut key and voila – the command is executed! No need to open the interface, start menu, or command prompt. But first we’ll need to make the shortcuts.

Create the Shortcuts

On the desktop, right-click anywhere and make a new shortcut from New > Shortcut.

Create-a-new-shortcut-to-a-command-from-the-desktop

Use any of the following commands for the location of the item.

To shutdown (like below):

shutdown /s

To log off:

shutdown /L

To restart:

shutdown /r

To hibernate:

shutdown /h

To switch user (not log off):

rundll32.exe user32.dll,LockWorkStation

Create-a-shortcut-to-shutdown-the-computer

Then name the item something suitable, like Shutdown for the first command.

Name-the-new-shortcut

Now right-click any shortcut you just created and choose Properties. Then ensure the Shortcut tab is selected and point your focus to the Shortcut key section.

Click in this text box and enter any key combination by performing the combination on the keyboard. For example, click this text box and enter the keys Ctrl + Alt + L to define the shortcut as such.

Create-a-keyboard-shortcut-to-lock-a-workstation

Save the changes. Now at any time you can simply enter Ctrl + Alt + L to lock the workstation.

Note: Windows Key + L will also lock a workstation regardless of this batch file being created. However, the other shortcuts require their own unique keys to be assigned.

Conclusion

Any program can be assigned a shortcut like we’ve discussed here. Creating a shortcut for repetitive tasks like this make it very useful for launching the desired command. Furthermore, making a keyboard shortcut for the command is quite possibly the quickest way to perform the actions.

Also See
#cmd #keyboard

Join the newsletter