▷ Top 19 Windows Powershell Keyboard Shortcuts » 【2023】

We’re big fans of anything that makes computers easy to use or manage. So obviously, we are fans of shortcuts. Windows shortcuts and key combinations make everything easier. So it stands to reason that Microsoft’s PowerShell shortcuts only make PowerShell better.

If you’re new to PowerShell, we have a beginner’s guide to PowerShell. It is ideal for home users and IT professionals. PowerShell is not limited to the scripting language. These keyboard shortcuts apply to Windows PowerShell ISE and Microsoft PowerShell Console.

Although PowerShell is spreading to other operating systems, such as macOS version 10.12 and later and even various Linux distributions, these shortcuts may not work on all operating systems or all versions of PowerShell. But even some will save you minutes or even hours when creating your scripts.

Best Keyboard Shortcuts for Windows PowerShell ISE

The PowerShell Integrated Scripting Environment (ISE) is where you can develop and test PowerShell scripts and applications. All versions of Microsoft’s Windows operating system, whether Windows Server, Pro, or Home, include PowerShell ISE.

Since Windows Powershell ISE is an authoring environment, the most common Microsoft Office shortcuts apply, such as Control + VS copy and Control + v to paste The shortcuts below are specific to Powershell ISE.

  • Ctrl + Tab Yes Ctrl + Shift + Tab: Moves PowerShell ISE focus from one tab to another. Control + Tongue takes you to the right, and Control + Change + Tongue takes you left.
  • Control + T: Open a new PowerShell workspace. You can use it to separate things like application projects that use multiple scripts. Notice how our three original scripts are opened under the PowerShell 1 Workspace Select PowerShell 2 workspace to work on a different project.
  • Control + W: Closes the current PowerShell workspace and all open scripts. If a script has not yet been saved, a dialog box will open asking whether or not you want to save your changes.
  • Control + METRE: Collapse or expand the outline. Notice the For each next clause and + Yes side signs. The first image shows the ForEach clause collapsed; the second shows the expanded script.
  • Control + F: Search for specific text in the script. This keyboard shortcut opens the search window. You’ll see settings you can apply to your search, such as case of coincidence, all the words, look for, Search in selection. you can also use Regular Expressions. The search begins where the cursor is placed in the script.
  • F3: Finds the next occurrence of the search parameters. could you use the then find button on the To find window, but the window is in the way. Try to select F3 to move on to the next occurrence. There will be a cursor highlight.
  • Change + F3: What if you achieve what you need by using F3? just use Change + F3 to find the previous occurrence. There will also be cursor highlighting.
  • CTRL+H: Find and replace any text in the script with other text. You can apply the same settings to this tool as to the Find tool.
  • Control + J: Opens a fragment selection box. code snippets are small pieces of code with proper syntax. Double-click to insert an excerpt, then add its parameters.
  • Control + Space: Similar to viewing snippets, this command opens Smart Sense. Intellisense presents context-specific options such as parameters or matchers. In this case, it shows the possible values ​​of the -ErrorAction parameter to the Remove-Item cmdlet. Click on one to select it.
  • F5: Executes the entire script and asks to save it. Check the box next to In the future, do not display this messageand so Okay to run and save by pressing F5 in the future. This is the same as selecting the launch script button.
  • F8: Select a section of the PowerShell script and press F8 to run just this snippet. It helps to debug the script piece by piece. This is the same as selecting the execute selection button.
  • Control + C That is Control + To break: Stops the script while it is running. If you selected text, Control + To break will stop the operation at this point. This is another useful shortcut for debugging your scripts. Selection of stop operation button has the same effect.

Best Windows PowerShell Console Keyboard Shortcuts

If you’ve used the command prompt (cmd), you’ll find that the Windows PowerShell console is just a command prompt designed to use PowerShell scripts and cmdlets on the command line. The console looks a lot like the old command line console.

If you are not creating automation applications or Windows Server Management Packs, you can use the console to run certain PowerShell commands. However, the PowerShell console has some additional features and shortcuts. Common command console shortcuts, such as the up arrow (^) and down arrow (˅) to retrieve recent commands also works in the PowerShell console.

  • Letter + F8: Can’t remember the cmdlet you used recently, but do you know it started with an S? Press S+F8 to list all recently used cmdlets starting with the letter S. In the image below, notice that the first letter is a different color to let us know we just looked at S.
  • alternative + F7: Clears all recent commands from the console history. It’s like clear clipboard. This is useful when you have done a lot in the console and the up and down arrows are no longer useful for jumping between needed commands.
  • Change + Go in: To enter multiple command lines, use Change + Go in at the end of each line before entering the next. Then select Go in to run them all in order.
  • F8: Look for items in the command history that begin with what appears in the prompt. In the following example, Get was typed at the command prompt. If you select F8 again, you will find the next command starting with Get, if any.
  • Control + Space: It works like Intellisense but on console. In the example, Get-Item was all that was entered. Using Ctrl + Space shows other cmdlets with this start and their syntax. You can use the left and right arrows to navigate between cmdlets.
  • Tongue: This works like autocomplete but cycles through the possibilities by tapping it repeatedly. In the first example, there is only the hyphen () start of a parameter. The selection tab cycles through the options until you get the one you want. In this case it is -Resource.

You now have the power of PowerShell

When Microsoft launched PowerShell in 2006, IT pros were busy using GUIs and batch files to manage things. Now these automation and configuration methods are handled with less work and faster, thanks to PowerShell.