Shutdown, Restart, Log off Windows Using Keyboard Shortcuts

Header

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 /?:

Image35

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.

Image36

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.

Image37

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

Image38

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

Image39

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.

Untitled 3 Copy3

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.

Last updated on 03 February, 2022

The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.