$svc = Get-Service W3SVC
while($svc.State -ne 'Stopped')
{
Start-Sleep -Seconds 1
}
... do your thing here...
Tags: sleep, while
This entry was posted on Sunday, November 24th, 2013 at 05:43 and is filed under Powershell. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.