Formats a task with additional information.
Install-Module TFL.Powershell.Format-Task -Scope CurrentUser -Force
Install-Module TFL.Powershell.Format-Task -Scope CurrentUser -Force
$length = Format-Task "Calculating Example's page size" {
$request = Format-Task "Fetching Example's page" {
return Invoke-WebRequest -Uri "https://example.com"
} -NoResult
return $request.RawContentLength
}
Write-Output "Example's front-page is $($length) bytes"
Calculating Example's page size
----------------------------------------------------------
Fetching Example's page
------------------------------------------------------
Time: 449.25 ms
Success: [√]
Result: 1270
Time: 563.56 ms
Success: [√]
Example's front-page is 1270 bytes
If you find any bugs or wish to suggest improvement, please file an issue and consider sending a pull-request.