Collection query for uninstalling user targetted AppV applications

Hi

I am trying to set up auto AppV removal from users.
This has been discussed many times but I cannot find exactly what I am after

I have a collection populated with users in a specific AD group. The AppV install deployment targets this collection

There is an associated uninstall collection that currently contains users not in the AD group targetted by the AppV uninstall deployment.

Initial testing shows this approach works and the AppV application is uninstalled when the user is removed from the AD group however the uninstall collection contains thousands of users. As there will be an uninstall collection for every AppV application I would prefer to reduce the collection memberships.

I have tried to change the collection query for the uninstall collection so it contains users that are not in the AD group and users that have previously received the install deployment.
I am struggling with the query for the application deployment status.
There are examples out there for devices but I cannot find anything for users

Any suggestions would be appreciated

Thanks

July 16th, 2014 8:04am

Jimbo,

I don't have an exact query for you here as I used the above approach recently and it's not ideal. The Microsoft Whitepaper 'Managing_AppV5_with_Configuration_Manager_2012SP1.pdf' (http://www.microsoft.com/en-gb/download/details.aspx?id=38177) Isn't much help either 

'from
SMS_R_System inner join SMS_G_System_AppClientState on
SMS_G_System_AppClientState.MachineName = SMS_R_System.Name where
SMS_G_System_AppClientState.ComplianceState = 1 and
SMS_G_System_AppClientState.AppName= "Application A"

In this scenario, the Install Collection is a collection of systems targeted by Application A. Since install deployments take precedence in Configuration Manager, as long as systems remain in the install collection, the uninstall deployment is ignored. When a system is removed from the Install Collection, the uninstall deployment will be the only available deployment and the application will be removed. The removal will happen the next time the system performs a global evaluation.

Note: The uninstall collection query listed only works for systems. The query must be modified when the install collection contains user objects.'

Can anyone suggest a modification to this query to work with user objects?

Free Windows Admin Tool Kit Click here and download it now
July 16th, 2014 12:16pm

Hi Paul,

I might have managed this :)

Please try the query below and let me know what you think.
the only issue I can see is that if the package had been deployed to a computer the the primary user of the computer would also be returned by the query.
Even so it greatly reduces the population of the uninstall collections

from
SMS_R_user
inner join SMS_G_System_AppClientState on  SMS_G_System_AppClientState.UserName = SMS_R_User.UniqueUserName
where
SMS_G_System_AppClientState.ComplianceState = 1 and
SMS_G_System_AppClientState.AppName = 'Application A'

July 16th, 2014 2:54pm

Cheers Jimbo. When I get an opportunity I will check this out.
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2014 3:00pm

Unfortunatley my collection query did not work

The client is only briefly populated in the collection.
I think the tables being queried only have details of the user when the package is still advertised. This would mean when the user drops out of the install collection with delta updates it would get removed from the tables. The next time the collection rule for uninstall updates it would remove the user that had just been added

So, any other ideas anyone ?

July 17th, 2014 7:43am

Yes, I know this is an old post, but Im trying to clean them up. Did you solve this problem, if so what was the solution?

Free Windows Admin Tool Kit Click here and download it now
March 15th, 2015 3:14pm

Since no one has answer this post, I recommend opening  a support case with Microsoft Customer Support Services (CSS) as they can work with you to solve this problem.

August 1st, 2015 3:42pm

I'm going to have a little play with this over the next week or so Garth. I'll update if I find a decent query.
Free Windows Admin Tool Kit Click here and download it now
August 1st, 2015 7:12pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics