Skip to content

Get LastCommandDuration

Nate Ferrell edited this page Aug 19, 2019 · 1 revision

Get-LastCommandDuration

SYNOPSIS

Gets the elapsed time of the last command via Get-History. Intended to be used in prompts.

SYNTAX

Get-LastCommandDuration [[-Id] <Int32>] [[-Format] <String>] [<CommonParameters>]

DESCRIPTION

Gets the elapsed time of the last command via Get-History. Intended to be used in prompts.

EXAMPLES

EXAMPLE 1

Get-LastCommandDuration

PARAMETERS

-Id

The Id of the command to get from the history.

Type: Int32
Parameter Sets: (All)
Aliases:

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

-Format

The format string for the resulting timestamp.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: {0:h\:mm\:ss\.ffff}
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

NOTES

RELATED LINKS

PSProfile

Concepts

Function Help

Command Aliases

Configuration

Helpers

Init Scripts

Meta

Modules to Import

Modules to Install

Path Aliases

Plugin Paths

Plugins

Power Tools

Project Paths

Prompts

Script Paths

Secrets

Symbolic Links

Variables

Badges

Azure Pipelines      Discord - Chat      Slack - Chat      Codacy PowerShell Gallery      GitHub Releases      GitHub Releases

Clone this wiki locally