Skip to main content

Powershell: Get-History

Illustrated: HISTORY

Get-History - Gets a list of the commands entered during the current session.

Alias: history, h, or ghy.

C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt

h : Get list of commands entered in current session
r 12 : Run command with Id 12 in current history list
ihy 12 : Run command with Id 12 in current history list
Get-History
history

or simply type 'h' instead of 'history'

h

List the command with id 1

h 1

Add '-count n' or '-c n' to list the last n run command

h -c 1

Run command with id 5 in the history list

ihy 5

Related commands

Linux command: history

Popular posts from this blog

Google Credential Provider for Windows: Notes

Google Credential Provider for Windows® (GCPW) lets users sign in to Windows® devices with the Google Account they use for work. GCPW provides users with a single sign-on experience to Google services and all the security features available with their Google Account.

DrayTek VigorAP 910C as Universal Repeater

3 steps to extend wi-fi coverage using DrayTek VigorAP 910C Set Operation Mode to Universal Repeater mode VigorAP 910C: Set Operation Mode Configuration to Universal Repeater Connect DrayTek VigorAP 910C to existing Wi-Fi Access Point Connect DrayTek VigorAP 910C to existing Wi-Fi Access Point Set Security Mode & Pass Phrase for DrayTek VigorAP 910C Set Security Mode & Pass Phrase for DrayTek VigorAP 910C Check Online Status