Tuesday, May 10, 2016

PowerShell cmdlet of the Day : Start-Sleep


Sometime, the more we move ahead, the more we start forgetting the basic things. It's in human nature I think or may be in mine :P .
Today when I was working on a PowerShell script, I come along with a cmdlet which I have used a lot in my early scripts.
The forgot cmdlet is "Start-Sleep".
It's hold the script activity for the period defined in it and it move to next line in the script after the define time in lapsed. For example if you set the Start-Sleep -Seconds 10, then it moved to next line after 10 seconds only.
Aman Dhally , Manya Kaur
The usage is simple., type Start-Sleep and then either use -seconds or -Milliseconds parameter and provide the value in number.

Simple, isn't :)

With Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.

No comments:

Post a Comment