Jump to content


Spinner

Software Metering Auto Uninstall & Remove from Install Collection

Recommended Posts

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

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.