Count Down using PowerShell
Requirement:
Need PowerShell codes to do Count Down for 60 Seconds approximately
Solution:
1..59 | Sort-Object -Descending | %{Start-Sleep -Seconds 1;cls;Write-Host "Count Down Starts $_" -ForegroundColor Green}
Indeed, it's a fun but this cane be used in many ways to achieve our needs
Output
In this code I have used - Precedence Operator , Sort-Object , % , Start-Sleep , CLS , Write-Host :)
Enjoy PowerShell :)
Other Languages
This article is also available in the following languages: