< Back

Start-PodeStopwatch

Sat Jan 18, 2020 7:20 pm

NAME Start-PodeStopwatch



SYNOPSIS

Starts a Stopwatch on some ScriptBlock, and outputs the duration at the end.





SYNTAX

Start-PodeStopwatch [-Name] <String> [-ScriptBlock] <ScriptBlock> [<CommonParameters>]





DESCRIPTION

Starts a Stopwatch on some ScriptBlock, and outputs the duration at the end.





PARAMETERS

-Name <String>

The name of the Stopwatch.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ScriptBlock <ScriptBlock>

The ScriptBlock to time.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Start-PodeStopwatch -Name 'ReadFile' -ScriptBlock { $content = Get-Content './file.txt' }















RELATED LINKS