Spinner Posted November 24, 2015 Report post Posted November 24, 2015 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 Quote Share this post Link to post Share on other sites More sharing options...
g-fx Posted November 24, 2015 Report post Posted November 24, 2015 does this help you? http://fbinotto.blogspot.co.nz/2014/10/sccm-2012-automatically-uninstall.html Quote Share this post Link to post Share on other sites More sharing options...
Spinner Posted November 24, 2015 Report post Posted November 24, 2015 does this help you? http://fbinotto.blogspot.co.nz/2014/10/sccm-2012-automatically-uninstall.html Thanks mate I'll see if i can adapt it to my environment Quote Share this post Link to post Share on other sites More sharing options...