November 2018
Intermediate to advanced
566 pages
17h 15m
English
Note how we wrote a multiline param() block this time. This makes the script more readable. PowerShell understands this, and reads the entire param() block as follows:
param([Parameter(Mandatory=$true, Position=0)][int]$CurrentTime, [Parameter(Mandatory=$true, Position=1)][int]$TotalTime)
The simple definition (without all the specifications) would simply be param($CurrentTime, $TotalTime). The primary point of this recipe, though, is the specifications.
Read now
Unlock full access