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

x
?
Solved

Help with VB script using wmi to service status

Posted on 2012-09-06
4
Medium Priority
?
392 Views
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
TSIRCSRV
OPNET Application Capture Agent
0
Comment
Question by:MatthewF
  • 3
4 Comments
 
LVL 12

Expert Comment

by:Seaton007
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.
0
 

Author Comment

by:MatthewF
ID: 38372398
opps...I forgot to hit the attach button, see below please
services.vbs
0
 

Accepted Solution

by:
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
0
 

Author Closing Comment

by:MatthewF
ID: 38386027
I figured out the solution
0

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