Collection Membership mismatch
Came up with some weird issue, we are using dynamic application method to install applications during build.
As of now for one machine which we have found till now and can be more, we wanted the machine to be rebuild and applications which were installed previously should not get installed so we deleted the machine from sccm and imported it again( so that machine gets removed from previous collections).
Now when rebuilding the machine the application are still installing, when checking in console it shows machine is part of only two collection which it should be however when i run below sql query in DB it shows machine part of other collection as well.
I am using below SQL query:
join dbo.v_Collection Coll on FCM.CollectionID = Coll.CollectionID
FCM.Name = ‘Machine name’
Checking the logs of dynamic app it detects machine part of various collection so it installs it.