How do you write a delay in a script?

Giang Phạm

New member
How do you write a delay in a script?
Answer
The delay can be specified either in seconds (default) or in milliseconds.
  1. Start-Sleep -Seconds 10 # wait 10 seconds.
  2. Start-Sleep 10 # wait 10 seconds.
  3. Start-Sleep -Seconds 2.7 # wait 3 seconds, rounded to integer.
  4. Start-Sleep -MilliSeconds 500 # wait half a second.
 

Tìm kiếm

Back
Top