tldr/pages/windows/get-history.md

18 lines
404 B
Markdown
Raw Normal View History

2021-10-24 03:25:21 +01:00
# Get-History
> Display PowerShell command history.
> Note: This command can only be used through PowerShell.
> More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.core/get-history>.
2021-10-24 03:25:21 +01:00
- 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 {{10}}`