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

RHEL: Install MySQL

[tuyendq@DangQuocTuyen ~]$ sudo yum list mysql Loaded plugins: product-id, search-disabled-repos, subscription-manager Error: No matching Packages to list [tuyendq@DangQuocTuyen ~]$ sudo yum install mysql Loaded plugins: product-id, search-disabled-repos, subscription-manager Resolving Dependencies --> Running transaction check ---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be installed --> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.60-1.el7_5 for package: 1:mariadb-5.5.60-1.el7_5.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================= Package Arch Version Repository Size ================================...

American Accent Training Resources

American Accent Training Book and CDs American Accent Training by Ann Cook Rebecca Linquist https://www.youtube.com/user/rebeccalinquist LISA’S YOUTUBE VIDEOS http://www.accurateenglish.com/lisas-youtube-videos/ Rachel's English Youtube Channel https://www.youtube.com/user/rachelsenglish Accent Ace https://www.youtube.com/user/AccentAceConfidence Practice American English sounds with free video lessons by Cheryl A. Posey http://www.speakingyourbest.com/freevideolessons.html Shaw English Online https://www.youtube.com/user/ShawEducation Pronunciation Pro https://www.youtube.com/user/pronunciationpro Heather Hansen https://www.youtube.com/user/heatherhansen

IBM Domino: Exprired password

Your account is locked out if you do not change your expired password. IBM Notes: Password is expired Account is locked out when password is expired Example of password policy