Help with VB script using wmi to service status

Posted on 2012-09-06
Last Modified: 2012-09-11
I have an existing script that check the status of all the service on all the servers read from an input file.  I would like to modify it to check the status and provide the detail, but for only 3 specfic service, eg

WinMagic SecureDoc Service
OPNET Application Capture Agent
Question by:MatthewF
    LVL 12

    Expert Comment

    If you could show us your current code, then we could show you what changes to make for the result you are looking for.

    Author Comment

    opps...I forgot to hit the attach button, see below please

    Accepted Solution

    The real question is the or function in vbs. eg

      For Each objItem In colItems
     If objItem.Name = "TSIRCSRV" or If objItem.Name = "WinMagic SecureDoc Service
    " or  If objItem.Name = "OPNET Application Capture Agent "

    " Then

    Author Closing Comment

    I figured out the solution

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Welcome to part one of a multi-part tutorial series, VBScript for Windows System Administrators.  The goal of this series is to teach non-programmers how to write useful VBS code to automate their environment, and perform tasks faster, and in a more…
    Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now