Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell command to wait some time

How can I stop a powershell script execution for an x time and that continue after it?
So, for example, I can run a command and wait 3 seconds to display the user a log, then continue with other script execution.

like image 509
Giorgio Bellisario Avatar asked May 20 '26 23:05

Giorgio Bellisario


1 Answers

Microsoft provides the Start-Sleep cmdlet specifically for this purpose. By default, its parameter is the number of seconds to sleep; if you need finer control over the idle period, you can specify -Milliseconds as the unit of time to use.

like image 175
Jeff Zeitlin Avatar answered May 22 '26 12:05

Jeff Zeitlin