Jump to content
Sign in to follow this  

Services Status

Recommended Posts

Hi all,

I would like to check services status on the server such as zabbix_agent.exe, snmp.exe, vmware-authd.exe,...And, this is my code :

$ProcessName = "zabbix_agentd.exe"

If ProcessExists($ProcessName) Then

MsgBox(0,"Services Status",$ProcessName & " is running.")


MsgBox(0,"Services Status",$ProcessName & " is not running.")


I don't know how to do it in order to show all services in MsgBox ?

Please instruct me to this case.

Thanks !

Edited by KenzoIT

Share this post

Link to post
Share on other sites

Something like this maybe?

$processList = "explorer.exe,scite.exe,taskmgr.exe"
$aProcessList = StringSplit($processList, ',', 2)
$msgBoxString = ""

For $each In $aProcessList
    If ProcessExists($each) Then
        $msgBoxString &= $each & " is running." & @CRLF
        $msgBoxString &= $each & " is not running." & @CRLF

MsgBox(0, "Service Status", $msgBoxString)
Edited by MrMitchell

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...