tldr/pages/windows/get-history.md

18 lines
400 B
Markdown
Raw Permalink Normal View History

2021-10-24 03:25:21 +01:00
# Get-History
> Display PowerShell command history.
> This command can only be used through PowerShell.
2021-10-24 03:25:21 +01:00
> More information: <https://docs.microsoft.com/powershell/module/microsoft.powershell.core/get-history>.
- Display the commands history list with ID:
`Get-History`
- Get PowerShell history item by ID:
`Get-History -Id {{id}}`
- Display the last N commands:
`Get-History -Count {{count}}`