[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Help with VB script using wmi to service status

Posted on 2012-09-06
Medium Priority
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
  • 3
LVL 12

Expert Comment

ID: 38372303
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

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

Accepted Solution

MatthewF earned 0 total points
ID: 38372598
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

ID: 38386027
I figured out the solution

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

867 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