Skip to content

Software Metering Auto Uninstall & Remove from Install Collection

Featured Replies

Hi All,

 

So i've setup the software metering to find licensed apps (EG Visio) and populate a collection with the data if its been used in the last 90 days. Below is the query for the collection

 

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_SYSTEM WHERE SMS_R_SYSTEM.ResourceID NOT IN (SELECT SMS_R_SYSTEM.ResourceID FROM SMS_R_SYSTEM INNER JOIN SMS_MonthlyUsageSummary ON SMS_R_SYSTEM.ResourceID = SMS_MonthlyUsageSummary.ResourceID INNER JOIN SMS_MeteredFiles ON SMS_MonthlyUsageSummary.FileID = SMS_MeteredFile.MeteredFileID WHERE DATEDIFF(DAY, SMS_MonthlyUsageSummary.LastUsage, GetDate()) < 90 AND SMS_MeteredFiles.FileName = "visio.exe")

 

My question is if i advertise the uninstall to this collection of pc's that haven't run it in the last 90 days is there a powershell script or something to also remove them from the original collection that has the installation advertisement? Because i can see that if it uninstalls, it detects the pc object is still in the installation collection and then installs the software again.

 

So my goal is to have an install and uninstall collection (done)

 

Have software metering check for unused licenses and populate a collection (done)

 

Uninstall from the pc and also remove from the original installation collection (require assistance) :)

 

Thanks,

 

Spinner

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.