How to Detect Missing Client Applications

As an administrator or MSP, it’s likely your responsibility to set up new computers. You may have a list of applications that must be installed at a minimum. Knowing if these applications continue to be available can be tricky once the computer is out of your hands and in the hands of its user. And you know who they will call at the most inconvenient time when something is not working, right?

So how can you detect missing client applications without spending a lot of time double-checking, triple-checking, or simply waiting for users to start complaining?

Be notified when a required application is missing

How to detect missing client applicationsUsing PowerShell, you can eliminate the guesswork and avoid manual checks. To test if required applications are installed, your computers have to run a simple script. If an application is missing, the script will report the discrepancy. The sample script below currently only writes what is or isn’t detected to the shell. Consider changing it so that missing applications are either automatically installed or reported to a place where you can be notified. If used with Panorama9, then the Custom Issue feature is an easy method for getting notifications. It will create an issue that is visible to you right within your P9 dashboard. Here’s how to set it up.

Test and run

It is recommended that you test out your script before you run it in production.

Change the line below, so it contains the list of applications your setup requires (use % as wildcard):

$apps = @("Skype", "7-Zip %", "VMware %")

To see installed applications and get an idea of what the script should look for, start a PowerShell prompt and enter:

Get-WmiObject -Class Win32_Product

The last step is to have your computers run the script. One way to do this is to configure a logon or logoff script via Group Policy. A simple guide to this process can be found here.
Copy the sample PowerShell script below and paste it to a file. To run successfully, the computers must have PowerShell 2.0 or higher installed.

#list of applications that should be installed
#(use % as wildcard)
$apps = @("Skype", "7-Zip %", "VMware %")

#loop applications list
foreach ($app in $apps) {

  Try {
    #do lookup
    $f = "name like '" + $app + "'"
    $res = Get-WmiObject -Class Win32_Product -filter "$f"

    #was application found?
    if (!$res) {
      "Not installed: $app"
    } else {
      "Installed: $app"
    }
  }
  Catch {
    Write-Warning "error: <$_>"
  }
}

As always, we’re happy to answer any question about monitoring the machine park. Write a comment or contact us via email.

Fresh Tips Directly in Your Inbox

Submit your email address below and get our updates on the most important things MSPs should know.

Leave a Reply

Your email address will not be published. Required fields are marked *