Locate old machines that are still consuming Inventory Solution license

book

Article ID: 171010

calendar_today

Updated On:

Products

Inventory Solution

Issue/Introduction

You notice that the number of licenses consumed by Inventory Solution is significantly higher than those consumed by other solutions eg. Patch Management and you wish to reconcile the difference.

Cause

It is likely that old machine records are present in the database containing data that was gathered by inventory solution. An inventory solution license will be consumed for each of these machines until the record is deleted (or set to 'retired' if Asset Management Solution is installed) 

Environment

8.1

Resolution

Use the query below to identify old machine resource records (determined by the last policy request they sent) that are consuming inventory solution licenses, which you can subsequently target for deletion. Deleting these machines will free the licenses. 

SELECT i.Name [License Policy Solution], id.Name [Computer] , cs.LastPolicyRequest
FROM LicenseInUse liu
JOIN vItem i  on liu.LicensingPolicyGuid = i.Guid
JOIN Inv_AeX_AC_Identification id on id._ResourceGuid = liu.ResourceGuid
JOIN Inv_AeX_AC_Client_Status cs on cs._ResourceGuid = liu.ResourceGuid
      WHERE i.Name = 'Inventory Solution'
      or i.Name = 'Inventory Pack for Servers'
ORDER BY cs.LastPolicyRequest