Archive for June, 2011

PowerShell queryService–Wait for a Dependency Starting Service

Posted on June 3, 2011. Filed under: Powershell Tangents | Tags: , , , , , |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/powershell-queryservice-wait-for-a-dependency-starting-service

There have been several occasions while scripting in PowerShell that the script is dependent on a specific service in the running state. A good example is the need to wait for the WMI Service to startup prior to making a WMI call, or SQL Server where when you restart the services, you have to wait for the services to be in a running state before you can execute commands.

The following function solves this issue. It also displays the proper implementation of a PowerShell wait timer to wait for a service to become operational before continuing in the script.

Find the full article on MasteringPosh.com

 

Happy Coding!

Read Full Post | Make a Comment ( None so far )

    About

    Business and Information Technology Tangents is dedicated to providing quality content while informing the world about technology.

    RSS

    Subscribe Via RSS

    • Subscribe with Bloglines
    • Add your feed to Newsburst from CNET News.com
    • Subscribe in Google Reader
    • Add to My Yahoo!
    • Subscribe in NewsGator Online
    • The latest comments to all posts in RSS

    Meta

Liked it here?
Why not try sites on the blogroll...