Skip to content

Get ConsoleHistory

github-actions edited this page May 1, 2026 · 1 revision

external help file: ModernConveniences-help.xml Module Name: ModernConveniences online version: schema: 2.0.0

Get-ConsoleHistory

SYNOPSIS

Returns the DOSKey-style console command history (up arrow or F8).

SYNTAX

Id

Get-ConsoleHistory -Id <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Like

Get-ConsoleHistory -Like <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Match

Get-ConsoleHistory -Match <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

All

Get-ConsoleHistory [-All] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

{{ Fill in the Description }}

EXAMPLES

EXAMPLE 1

Get-ConsoleHistory -Like *readme*

Id CommandLine


30 gc .\README.md 56 gc .\README.md

EXAMPLE 2

Get-ConsoleHistory -Id 30

Id CommandLine


30 gc .\README.md

PARAMETERS

-Id

{{ Fill Id Description }}

Type: Int32
Parameter Sets: Id
Aliases:

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Like

{{ Fill Like Description }}

Type: String
Parameter Sets: Like
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Match

{{ Fill Match Description }}

Type: String
Parameter Sets: Match
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-All

{{ Fill All Description }}

Type: SwitchParameter
Parameter Sets: All
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Management.Automation.PSObject with these properties:

* Id: The position of the command in the console history.

* CommandLine: The command entered in the history.

NOTES

RELATED LINKS

Clone this wiki locally