Using WMI to retrieve the version of Greenway Intergy software installed remotely

One of the applications we support is Greenway Intergy EHR (Electronic Health Records):

EHR & Practice Management

This application must be installed locally on client machines, and it can be useful to determine the version installed. Of course, you do not want to physically go around to each machine to do this, so let’s come up with a simple script that will accomplish this task.

I have used “PSExec” throughout my career, and for good reason – it is a simple tool that allows an administrator to run remote commands on a Windows device and collect the results centrally. In fact, many commercial management tools use this software as a core component for remote administration. It is a free tool and can be used like so:

psexec \\COMPUTER wmic product where “Name like ‘%%Greenway%%'” get Name, Version >> greenway-report.txt 

The above command will use PSEXEC to call “wmic” – the Windows Management Interface command line tool – on the remote computer “COMPUTER” – to pull the current version of the Greenway software installed and place it in a text file in the current directory called “greenway-report.txt”. There are many options you could use here, such as passing a username/password combination to PSEXEC if your current credentials did not allow you remote access to “COMPUTER”, parsing the text file for particular information using PowerShell or another scripting language, etc – but this should get you started in your adventures in scripting.

Automation is a key component of any properly configured infrastructure and the ability to script redundant and tedious tasks makes a huge difference in how your IT resources are utilized.

 

 

Leave a Reply

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