This guide goes over how to add chrome extensions to inventory. Doing so requires the use of a custom powershell script, attached to this document. You can also view the script's source here
This script is not officially supported by Ivanti support. If you have any issues with the powershell script, please create a comment on this document.
Any requests for feature additions for this functionality can be requested by adding a comment to the document.
This section details how this script works on the client. Feel free to skip to Custom Data Entry if you aren't interested in this.
The PowerShell script follows the logic tree below:
- Get user directories
- Check each user directory for the \AppData\Local\Google\Chrome\User Data\Default\Extensions directory
- If it exists, get each sub-folder - these are the extension folders. The folder name is the extension ID, this is stored.
- Read the manifest.json to gather the extension's name and version
- If the name is missing, use the ID and reach out to the extension's store page at chrome.google.com, and get the extension name from the webpage. Add "Chrome Web Store" to the name to denote the source.
- If the name is present, store it with "Local" to denote the source
- If both methods fail, set the name to "Unknown"
- Create instances of the LDChromeExtension wmi class with the name, version, and ID of the extension
Additionally, at the beginning of the script, it checks for the existence of the LDChromeExtensions WMI class and if the class doesn't exist, creates it. It also clears any existing instances of that class before creating new ones. This is so if an extension is removed, the WMI instance for that extension doesn't remain.
Custom Data Entry
This section covers the custom data entry needed to gather the results of the above script.
First, head to Tools > Reporting/Monitoring > Manage Software List > Inventory > Custom Data > WMI Items
Select "WMI Items" and hit "New". Then fill in details based on the info below:
Ensure the "ID" has the Key checkbox checked. The Version and Name are not keys.
Once done, click "OK" and you should be asked to apply these property changes. Select Yes and you should be prompted with a Model Attributes window like the one below:
Ensure it matches the picture above, and hit "Model Now". If it's grayed out, delete and re-type a letter in the Table name so a change is registered, and the button should light up.
After that's done, hit the "Make available to clients" button:
Important: Make sure to restart the LANDesk Inventory Service.
Deploying The Script
Next, you need to deploy this powershell script so that the inventory scanner has data to pull in. Create a Powershell distribution package and point it to the powershell script, ensuring the source is accessible by clients. Below is an example.
Once the script runs and an inventory scan runs, you should now see inventory entries looking like this:
You now have Chrome extensions in your inventory