
It lets you run commands to make various changes in the Settings, troubleshoot several issues, manage features, and automate your works, etc. This is a very important tool that makes it easy to perform several tasks just by typing some simple commands. Thus, if you want to use the PowerShell command history functionality in previous Windows versions (Windows 7/8.1 and Windows Server 2008R2/2012R2), in addition to installing Windows Management Framework 5.Windows 10 comes with a pre-installed PowerShell cross-platform tool. PSReadLine is not included into the standalone PowerShell 5.0 (or never) installer for previous versions of Windows. This module in Windows 10 is located in the C:\Program Files\WindowsPowerShell\Modules\PSReadline folder and is automatically imported when the PowerShell console starts. PSReadLine highlights the syntax in the console, it is responsible for selection of the text with your mouse and copying/pasting it using CTRL+C and CTRL+V. The command history functionality in PowerShell 5.0 is not built into the Windows Management Framework itself, but is based on the third-party PSReadLine module, which significantly extends the functionality of the PowerShell console. Managing PowerShell Command History with the PSReadLine Module To go to the next command in history, press F8 again. The last entry in the command history matching this text will be found. Using the F8 key, you can find the command in history that matches the text on the current command line.

As a result, the following command corresponding to the search pattern will appear on the screen.

If the found command doesn’t suit you, to continue searching through the history, press CTRL+R/ CTRL+S again. Line matches are highlighted in the command. The PowerShell console should display the previous command corresponding to the search string. The text you entered will be found in the command history in any position (unlike search in PowerShell using F8 or Shift+F8, which allows to look for the matches from the beginning of the line only). Press the key combination and start typing part of the command that you want to find in previously executed commands. If you don’t want to scroll through the entire PowerShell command history using up/down arrows, you can search the command history by using the keyboard shortcuts CTRL+R (reverse search) and CTR +S (forward search). How to Search PowerShell Command History? The F7 key is used to search through cmd history.
