November 2018
Intermediate to advanced
566 pages
17h 15m
English
This is, again, a very simple task. Follow these steps to perform the conversion, and understand how to call the function in the final step:
function Start-Count {
Go to the end of the script, and close the braces to complete the function. The complete script should look like this:
function Start-Count {
param ($TotalTime = 25)
$CurrentTime = 0
while ($CurrentTime -le $TotalTime) {
Write-Progress -Activity "Counting to $TotalTime" -Status "Elapsed time: $CurrentTime seconds" -PercentComplete ($CurrentTime / $TotalTime * 100)
Start-Sleep 1
$CurrentTime++
}
}
Read now
Unlock full access