SCCM 2012 – Uninstall not used application

SCCM 2012 – Uninstall not used application
3.86 (77.14%) 7 votes

Hi All,

I often get asked questions about license management. SCCM, with the help of Asset Intelligence, can generate reports of licenses for Microsoft and non-Microsoft. Microsoft license is easy, it automatically connect to Volume License website and sync the data down, it means it will download your license information and not upload it.

For non-Microsoft software, you can create a csv file and import it into the SCCM, easy isn’t it.

However, SCCM will not do anything else, it means it will not automatically deny access to an application because you don’t have enough licenses as well as it will not automatically uninstall a not-used application, you need to do this management.

Of course, the 1st is quite easy, for all paid apps (of course you’ll not do it for non-paid apps), you create a deployment that require authorisation. Once done, you can create a script do authorise only if there is enough license available, but how to check this? Well, this depends on how and where you keep this information.

The 2nd option is quite easy, uninstall a software if it is not being used for X number of days. The scenario is always the same. User X asked to have project installed but only open once to check something and never open it again

In this scenario, you can use software metering and create rules to monitor the execution of a specific .exe file (not that I don’t recommend to have many, the maximum I’ve seem was about 200 and SCCM handled it quite well. If I’m not mistaken, SCCM has a limit of 1000 rules and if you need more, I’d recommend using 3rd party vendor for it)

Anyway, once you have the rule, it is time to create a collection of the machines that have the software installed but did not run it in the last X days.

There are many options to do it, people can use file names, but I like to use add remove program information.

The query bellow will check if the software Camtasia Studio 8 is installed (not that I’m looking for both 32 and 64 bits information) and if yes, will check against the software metering database for any machine that did not run the rule RFL00013 in the last 30 days.

select distinct SMS_R_System.Name from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_ADD_REMOVE_PROGRAMS_64 on SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceID = SMS_R_System.ResourceId where ((SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = “Camtasia Studio 8”) or (SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName = “Camtasia Studio 8”))
and SMS_R_System.OperatingSystemNameAndVersion LIKE ‘%Workstation%’
and SMS_R_System.ResourceId not in (SELECT DISTINCT SMS_MonthlyUsageSummary.ResourceID FROM SMS_MonthlyUsageSummary INNER JOIN SMS_MeteredFiles ON SMS_MonthlyUsageSummary.FileID = SMS_MeteredFiles.MeteredFileID WHERE DateDiff(day, SMS_MonthlyUsageSummary.LastUsage, GetDate()) < 30 AND SMS_MeteredFiles.SecurityKey = "RFL00103") As a result, you'll have a list of all machines (note that my query only return workstation machines as I don't want to mess up with servers) Once you have the collection, you can create an uninstall deployment for that collection


Recent Posts

Comments are closed.
%d bloggers like this: