Discover what software is installed on your Azure and non-Azure machines

In this tutorial, you learn how to discover what software is installed in your environment. You can collect and view inventory for software, files, Linux daemons, Windows Services, and Windows Registry keys on your computers. Tracking the configurations of your machines can help you pinpoint operational issues across your environment and better understand the state of your machines.

In this tutorial you learn how to:

  • Enable the solution
  • Onboard an Azure VM
  • Onboard a non-Azure VM
  • View installed software
  • Search inventory logs for installed software

Prerequisites

To complete this tutorial, you need:

Log in to Azure

Log in to the Azure portal at http://portal.azure.com.

Enable Change tracking and Inventory

First you need to enable Change tracking and Inventory for this tutorial. If you've previously enabled the Change Tracking solution, this step is not necessary.

Navigate to your Automation Account and select Inventory under CONFIGURATION MANAGEMENT.

Choose the Log Analytics workspace and Automation Account and click Enable to enable the solution. The solution takes up to 15 minutes to enable.

Inventory onboard configuration banner

To enable the solution, configure the location, Log analytics workspace, and Automation Account to use and click Enable. If the fields are grayed out, that means another automation solution is enabled for the VM and the same workspace and Automation Account must be used.

A Log Analytics workspace is used to collect data that is generated by features and services such as Inventory. The workspace provides a single location to review and analyze data from multiple sources.

Enabling the solution can take up to 15 minutes. During this time, you shouldn't close the browser window. After the solution is enabled, information about installed software and changes on the VM flows to Log Analytics. It can take between 30 minutes and 6 hours for the data to be available for analysis.

Onboard a VM

In your Automation Account, navigate to Inventory under CONFIGURATION MANAGEMENT.

Select + Add Azure VM, this opens up the Virtual machines page and allows you to select an existing VM from the list. Select the VM you want to onboard. On the page that opens click Enable to enable the solution on the VM. The Microsoft Management Agent is deployed to the VM and configures the agent to talk to the Log Analytics workspace you configured when enabling the solution. This can take a few minutes to complete the onboarding. At this point, you can select a new VM from the list and onboard another VM.

Onboard a non-Azure machine

To add non-Azure machines, install the agent for Windows or Linux depending on your operating system. Once the agent is installed, navigate to your Automation Account and go to Inventory under CONFIGURATION MANAGEMENT. When you click Manage Machines, you see a list of the machines reporting to your Log Analytics workspace that do not have the solution enabled. Select the appropriate option for your environment.

  • Enable on all available machines - This option enables the solution on all the machines reporting to your Log Analytics workspace at this time.
  • Enable on all available machines and future machines - This option enables the solution on all machines reporting to your Log Analytics workspace and subsequently on all future machines added to the workspace.
  • Enable on selected machines - This option enables the solution only on the machines that you have selected.

Manage Machines

View installed software

Once the Change tracking and Inventory solution is enabled, you can view the results on the Inventory page.

From within your Automation Account, select Inventory under CONFIGURATION MANAGEMENT.

On the Inventory page, click on the Software tab.

On the Software tab, there is a table that lists the software that has been found. The software is grouped by software name and version.

The high-level details for each software record are viewable in the table. These details include the software name, version, publisher, last refreshed time (the most recent refresh time reported by a machine in the group), and machines (the count of machines with that software).

Software inventory

Click on a row to view the properties of the software record and the names of the machines with that software.

To look for a specific software or group of software, you can search in the text box directly above the software list. The filter allows you to search based off the software name, version, or publisher.

For instance, searching for "Contoso" returns all software with a name, publisher, or version containing "Contoso".

Search inventory logs for installed software

Inventory generates log data that is sent to Log Analytics. To search the logs by running queries, select Log Analytics at the top of the Inventory window.

Inventory data is stored under the type ConfigurationData. The following sample Log Analytics query returns the inventory results where the Publisher equals "Microsoft Corporation".

ConfigurationData
| where ConfigDataType == "Software"
| where Publisher == "Microsoft Corporation"
| summarize arg_max(TimeGenerated, *) by SoftwareName, Computer

To learn more about running and searching log files in Log Analytics, see Azure Log Analytics.

Single machine inventory

To see the software inventory for a single machine, you can access Inventory from the Azure VM resource page or use Log Analytics to filter down to the corresponding machine. The following example Log Analytics query returns the list of software for a machine named ContosoVM.

ConfigurationData
| where ConfigDataType == "Software"
| summarize arg_max(TimeGenerated, *) by SoftwareName, CurrentVersion
| where Computer =="ContosoVM"
| render table
| summarize by Publisher, SoftwareName

Next steps

In this tutorial you learned how view software inventory such as how to:

  • Enable the solution
  • Onboard an Azure VM
  • Onboard a non-Azure VM
  • View installed software
  • Search inventory logs for installed software

Continue to the overview for the Change tracking and Inventory solution to learn more about it.