2021-10-24 03:25:21 +01:00
|
|
|
# Get-History
|
|
|
|
|
|
|
|
> Display PowerShell command history.
|
2021-12-07 11:20:03 +00:00
|
|
|
> This command can only be used through PowerShell.
|
2022-10-04 16:06:23 +01:00
|
|
|
> 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 {{count}}`
|