How-to: PowerShell Shortcut Keys

Moving:
  Home         Move to the beginning of the line.
  Left Arrow   Move the cursor one character left.
 Ctrl+L.Arrow  Move left one word at a time. 
  Right Arrow  Move the cursor one character right.
 Ctrl+R.Arrow  Move right one word at a time. 
  End          Move to the end of the line. 

History:
  Tab       Access the tab expansion function (also Shift+Tab). 
  Up        Scan backward through command history.
  Down      Scan forward through command history.
  Pg Up     Access the first command in the command history.
  Pg Dn     Access the last command in the command history.
  Alt+F7    Clear the command history. 

Editing:
 Shift+Enter  Add a line.
 Press Enter  Execute the command.
  Insert      Switch between insert mode and overwrite mode.
  Ctrl+C      Break out of the subprompt or terminate execution.
 Alt+Space+E  Display an editing shortcut menu (mark/copy/paste).
    `       Insert a line break or as an escape character to make a literal character.
            You can also break a line at the pipe (|) character.
  Ctrl+S    Pause or resume the display of output.

 Right-click If QuickEdit is disabled, displays an editing shortcut menu
            To copy the screen buffer to the Clipboard, right-click, choose Select, and then press Enter. 

  $$       The last token in the last line received by the session. (Like !$ in bash )
           (this is an automatic variable)

Deleting:
  Delete    Delete the character under the cursor.
  ⌫ Backspace Delete the character to the left of the cursor.
  Esc       Clear the current line. 
  Ctrl+End  Delete all characters in the line after the cursor. 
  Ctrl+Home Delete all characters from the cursor to the beginning of a line.

Function Keys:
  F1        Move the cursor one character to the right on the command line.
            At the end of the line, insert one character from the text of your last command.

  F2        Create a new command line by copying your last command line up to the character you type.

  F3        Complete the command line with the content from your last command line,
            starting from the current cursor position to the end of the line.

  F4        Delete characters from your current command line, starting from
            the current cursor position up to the character you type.

  F5        Scan backward through your command history.

  F7        Displays a pop-up window with your command history and allows you to select a command.
            Use the arrow keys to scroll through the list. Press Enter to select a command to run,
            or press the Right arrow key to place the text on the command line.

  F8        Use text you’ve entered to scan backward through your command history
            for commands that match the text you’ve typed so far on the command line.

  F9        Run a specific numbered command from your command history.
            Command numbers are listed when you press F7.

PowerShell ISE shortcuts:

  Ctrl-M   Expand or Collapse Outlining
  CTRL+F   Find in script
  CTRL+S   Save
  F5       Run
  F8       Run Selection

"Seeing is not enough; you have to feel what you photograph" ~ Andre Kertesz

Related PowerShell Cmdlets

Clear-History - Delete entries from the command history.
Get-History - Get a listing of the session history.


 
Copyright © 1999-2023 SS64.com
Some rights reserved