PoSh Get-Service wait for status

So you’re writing a script and you have to start a service and/or wait for it. You can use Get-Service to retrieve the status but you’ll need to put it in a loop so you can wait for the status you need.¬†You’ll probably end up with something like this: PowerShell while ((Get-Service -Name Spooler).Status -ne "Stopped"){ Start-Sleep -Seconds 2 } Continue with your script... 12345 while ((Get-Service -Name Spooler).Status -ne "Stopped"){    Start-Sleep -Seconds 2} Continue with your script... This is pretty basic. It’ll wait indefinitely until the service has been started. So you continue on your quest to get rock-solid code and...