Measure-PSUBlock
SYNOPSIS
Measures a script block.
SYNTAX
Measure-PSUBlock -ScriptBlock <ScriptBlock> -Name <String>
[<CommonParameters>]DESCRIPTION
Measures a script block. This requires the profiler feature of PowerShell Universal to be enabled.
EXAMPLES
Example 1
PS C:\> Measure-PSUBlock -Name 'CodeToMeasure' -ScriptBlock {
Start-Sleep 1
}Measures a code block in PowerShell Universal.
PARAMETERS
-Name
A display name that is used when displaying in the profiler.
-ScriptBlock
The script block to measure.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
System.Object
NOTES
RELATED LINKS
Last updated
Was this helpful?