Reputation: 191
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.
Upvotes: 7
Views: 17584
Reputation: 10799
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.
Upvotes: 9