Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » Get-History

Get-History - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Gets a list of the commands entered during the current session.

Get-History [[-Id] <Int64[]>] [[-Count] <Int32>] [<CommonParameters>]

The Get-History cmdlet gets the session history, that is, the list of commands entered during the current session.

Windows PowerShell automatically maintains a history of each session. The number of entries in the session history is d
etermined by the value of the $MaximumHistoryCount preference variable. Beginning in Windows PowerShell 3.0, the defaul
t value is 4096.

You can save the session history in XML or CSV format. By default, history files are saved in the home directory, but y
ou can save the file in any location.

For more information about the history features in Windows PowerShell, see about_History (