Invokes a previously executed command.
Snap-In: Microsoft.PowerShell.Core
Syntax:
Invoke-History [
[-Id] <String>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Description:
Accepts a number value that indicates the identifier of a previously executed command. That command is then run again. This ID number can be found by running the get-history Cmdlet. The cmdlet history lasts only as long as the individual session.