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.

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

IIS: Delete cached files on server running IIS

Delete cached files on server running IIS When changing css, javascript files, check to delete if IIS still caches old files in the default folder C:\inetpub\temp\IIS Temporary Compressed Files\<sitename>\$^_gzip_D^\ Apply to: IIS 8.5

Linux command: du - disk usage

Where have all my storage gone? du summarize disk usage of the set of FILEs, recursively for directories.

ManageEngine ServiceDesk Plus - Reset password

Let's reset the default administrator's password to 'admin'