Skip to content

TomBonnerAtTFL/TFL.Powershell.Format-Task

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFL.Powershell.Format-Task

Formats a task with additional information.

Build status PowerShell Gallery

Installation

Install-Module TFL.Powershell.Format-Task -Scope CurrentUser -Force

Usage

Code

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" 

Output

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

Issues

If you find any bugs or wish to suggest improvement, please file an issue and consider sending a pull-request.

About

Neatly arranges sub-tasks in PowerShell scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%