Home Windows Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts – A Step-by-Step Guide

Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts – A Step-by-Step Guide

by admin

Command Prompt and PowerShell are two essential tools for a command-line user on Windows PCs. If you access these tools frequently, you can add the Command Prompt and PowerShell shortcuts to your desktop to quickly access them.

You can even assign a keyboard shortcut to these apps.

Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide

Create a Command Prompt Desktop Shortcut on Windows 10

You can add a Command Prompt shortcut to your desktop the same way you add any other shortcut. Once the shortcut is added, you can change its name and icon to your liking.

To start:

  1. Open the Start menu and search for Command Prompt.
  2. Right-click Command Prompt in the search results and select Open file location.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. A File Explorer window opens with a Command Prompt shortcut. Here, right-click the Command Prompt shortcut again and select Open file location.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. You should now see a file called cmd.exe, which is the Command Prompt executable file. Right-click the cmd.exe file and select Send to > Desktop (create shortcut).
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Access your desktop, and you should find a new shortcut called cmd.exe – Shortcut there. Double-click this shortcut to open Command Prompt.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. To rename the shortcut, right-click the shortcut, select Rename, enter a new name, and press Enter.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide

Run the Command Prompt Shortcut With Admin Rights

To run certain commands, you’d need admin privileges in Command Prompt. You can configure your desktop Command Prompt shortcut so that it always opens the tool with admin privileges.

To do this:

  1. Right-click the Command Prompt shortcut on your desktop and select Properties.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. On the Properties window, select the Shortcut tab at the top.
  2. In the Shortcut tab, select the button that says Advanced.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. A new window opens on your screen. Here, enable the Run as administrator checkbox and select OK at the bottom.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Go back to the Properties window, select Apply and then select OK at the bottom.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Double-click the Command Prompt shortcut, and it should now open with admin privileges.

Create a Keyboard Shortcut to Launch Command Prompt

You can make opening Command Prompt even easier by assigning a keyboard shortcut to the tool’s desktop shortcut. Windows allows you to choose a custom combination of keys for the shortcut.

To assign a shortcut:

  1. Right-click the Command Prompt shortcut on your desktop and select Properties.
  2. Select the Shortcut tab at the top of the Properties window.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. In the Shortcut tab, select the Shortcut key field. Know that whatever keyboard shortcut you assign here, Windows will prefix it with Ctrl + Alt.
  2. Press the key that you want to assign to the Command Prompt shortcut. For example, press C. The Shortcut key field should display Ctrl + Alt + C.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Then, select Apply followed by OK at the bottom to save your changes.

Add the Command Prompt Shortcut to the Windows Taskbar

You may want to pin Command Prompt to your taskbar to open the tool with a single click:

  1. Right-click the Command Prompt shortcut on your desktop and select Pin to taskbar.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. The tool is now on your taskbar.
  2. To remove this taskbar shortcut, right-click the shortcut and select Unpin from taskbar.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide

Create a PowerShell Desktop Shortcut on Windows 10

If you use PowerShell, adding PowerShell’s shortcut to your desktop is as easy as adding any other app’s shortcut.

  1. Launch the Start menu and search for Windows PowerShell.
  2. Right-click Windows PowerShell in the search results and select Open file location.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. On the following screen, right-click Windows PowerShell and select Open file location.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. You should now see powershell.exe. Right-click this file and select Send to > Desktop (create shortcut).
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. You now have a PowerShell shortcut on your Windows desktop.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide

Run the PowerShell Shortcut With Admin Rights

If you run commands that require admin privileges, configure the PowerShell shortcut to always open the tool with admin rights.

  1. Right-click the PowerShell shortcut on your desktop and select Properties.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Select the Shortcut tab in Properties.
  2. Select the Advanced button in the Shortcut tab.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. In the Advanced Properties window that opens, activate the Run as administrator box and then select OK at the bottom.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Select Apply and then select OK at the bottom of the window.
  2. Your PowerShell shortcut will now always open with admin rights.

Create a Keyboard Shortcut to Launch PowerShell

You can assign a shortcut to the PowerShell desktop so that the tool opens with a keystroke.

  1. Right-click the PowerShell shortcut on your desktop and select Properties.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Select the Shortcut tab in Properties.
  2. Select the Shortcut key field and type the keyboard shortcut you want to use. Keep in mind that your shortcut will be prefixed with Ctrl + Alt.
  3. For example, if you assign P, Windows will treat it as Ctrl + Alt + P.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. Select Apply and then select OK at the bottom to save your shortcut.

Add the PowerShell Shortcut to the Windows Taskbar

For quick access, you can add the PowerShell shortcut to your taskbar.

  1. Right-click the PowerShell shortcut on your desktop and select Pin to taskbar.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide
  1. A PowerShell icon is now added to your taskbar.
  2. To remove this shortcut, right-click the shortcut on the taskbar and choose Unpin from taskbar.
Setting Up Command Prompt and PowerShell Keyboard/Desktop Shortcuts - A Step-by-Step Guide

Bonus Tip: Open Command Prompt or PowerShell’s Taskbar Shortcut With a Keyboard Shortcut

By default, Windows 10 assigns a keyboard shortcut to each app on the taskbar. These shortcuts use a numeric system. Here, the app on the farthest left side of the taskbar is numbered one, and then two, three, and so on.

To use this shortcut, you’d press the Windows key and then the number of your app on the taskbar. For example, if Command Prompt is the fifth numbered shortcut on the taskbar, you’d use Windows + 5 to open the utility.

You can drag the icons on the taskbar in any direction (left or right), and their shortcuts will change accordingly.

You may also like