I needed to check software installs on multiple machines. One thing I found was to utilize WMI (Windows Management Instrumentation). The command is simple:

wmic product where "name like '%%Office%%'" get name

Above searches the installed programs list and returns anything with word Office in it. The output looks like:

Name
Office 16 Click-to-Run Extensibility Component
Office 16 Click-to-Run Localization Component
Office 16 Click-to-Run Extensibility Component 64-bit Registration
Office 16 Click-to-Run Licensing Component

This helps me quickly to check and find if a particular software is installed. You can combine above with a psexec command and get it in one swoop. In my case, I used ScreenConnect’s command line to run it and checking the list.