Home
%3CLINGO-SUB%20id%3D%22lingo-sub-339949%22%20slang%3D%22en-US%22%3EThe%20case%20of%20unexplained%20-%20ConfigMgr%202012%3A%20Mismatch%20in%20a%20User%20collection%20members%20count%20in%20Primary%20and%20CAS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339949%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20size%3D%221%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23ff0000%22%3EFirst%20published%20on%20TECHNET%20on%20Jun%2008%2C%202015%3C%2FFONT%3E%20%3C%2FSTRONG%3E%20%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%221%22%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Fumairkhan%2F2015%2F06%2F08%2Fconfigmgr-2012-the-case-of-unexplained-mismatch-in-a-user-collection-members-count-in-primary-and-cas%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Fumairkhan%2F2015%2F06%2F08%2Fconfigmgr-2012-the-case-of-unexplained-mismatch-in-a-user-collection-members-count-in-primary-and-cas%2F%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIssue%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3D%3D%3D%3D%3D%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EOnly%20a%20single%20custom%20user%20collection%20(rest%20others%20work%20fine)%20doesn%E2%80%99t%20replicate%20it%20members%20up%20in%20the%20hierarchy%20to%20CAS.%20We%20see%2023%20members%20down%20in%20that%20collection%20and%20nothing%20in%20CAS.%20We%20have%20a%20CAS%20and%206%20primaries%20and%20all%20these%2023%20members%20we%20are%20talking%20belong%20to%20a%20single%20primary.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMore%20details%20on%20how%20the%20collection%20is%20defined.%20It%E2%80%99s%20an%20App%20collection%20meant%20for%20uninstallation%20applications.%20So%20it%20detects%20the%20application%20is%20installed%20for%20a%20machine%20by%20a%20user%20by%20the%20%3CSTRONG%3E%3CEM%3ESMS_G_System_AppClientState%20%3C%2FEM%3E%3C%2FSTRONG%3Eclass.%20The%20query%20used%20is%20as%20described%20in%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fblogs.technet.com%2Fb%2Fconfigmgrdogs%2Farchive%2F2014%2F11%2F03%2Fmanaging-app-v-deployments-in-configmgr-2012.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fblogs.technet.com%2Fb%2Fconfigmgrdogs%2Farchive%2F2014%2F11%2F03%2Fmanaging-app-v-deployments-in-configmgr-2012.aspx%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eselect%20SMS_R_USER.ResourceID%2CSMS_R_USER.ResourceType%2CSMS_R_USER.Name%2CSMS_R_USER.UniqueUserName%2CSMS_R_USER.WindowsNTDomain%20%0Afrom%20SMS_R_User%20inner%20join%20SMS_G_System_AppClientState%20on%20SMS_R_USER.UniqueUserName%20%3D%20SMS_G_System_AppClientState.UserName%20%0Awhere%20SMS_G_System_AppClientState.AppName%20%3D%20%22APPLICATIONNAME%22%20%0Aand%20SMS_G_System_AppClientState.ComplianceState%20%3D%201%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EAssessment%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ENow%20the%20basic%20things%20that%20initially%20comes%20to%20mind%20when%20the%20data%20is%20there%20on%20the%20child%20but%20not%20there%20on%20the%20CAS%20is%20replication.%20Yes%20DRS!%20But%20we%20have%20verified%20tracking%20the%20number%20and%20changes%20for%20the%20replication%20group%20Collection_Membership%20being%20the%20latest%20on%20CAS%20and%20links%20are%20ACTIVE.%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20VLOGS%20don%E2%80%99t%20show%20any%20exceptions%20in%20processing%20any%20record%20and%20all%20looks%20good.%20So%20why%20the%20mismatch%3F%3F%20Or%20What%E2%80%99s%20happening%20here%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EDissection%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EHere%20normal%20troubleshooting%20basically%20will%20defy%20and%20frustrate%20you%20unless%20the%20evaluation%20logic%20is%20known.%20I%20will%20first%20explain%20the%20concept%20then%20we%20will%20come%20back%20to%20the%20issue%20again.%3C%2FP%3E%0A%3CP%3ESuppose%20we%20have%20a%20hierarchy%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20203px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100713i072AEB019967DE5B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%221.jpg%22%20title%3D%221.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EDifference%20between%20evaluation%20in%20a%20User%20collection%20and%20Device%20collection%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20So%20collections%20%3CSTRONG%3E(%5BCollections%5D%3C%2FSTRONG%3E)%20are%20%3CSTRONG%3Eglobal%20data%3C%2FSTRONG%3E%2C%20no%20matter%20you%20create%20them%20at%20any%20site%20they%20will%20replicate%20to%20all%20other%20sites.%20%3CSTRONG%3E%5BCollectionMembers%5D%3C%2FSTRONG%3E%20as%20client%20data%20are%20%3CSTRONG%3Esite%20data%3C%2FSTRONG%3E.%20So%20if%20I%20create%20a%20collection%20membership%20rule%20for%20a%20%3CSTRONG%3Edevice%20collection%3C%2FSTRONG%3E%20as%20all%20Windows%207%20machines%20on%20CAS%2C%20what%20happens%3F%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Note%20that%20there%20is%20no%20CollEval%20at%20CAS%2C%20and%20the%20rule%20flows%20down%20to%20each%20primary%20as%20global%20data.%20The%20collection%20membership%20is%20locally%20calculated%20for%20each%20site%20individually%20and%20independently.%20And%20once%20done%20each%20sites%20updates%20its%20%5BCollectionMembers%5D%20and%20send%20the%20membership%20to%20CAS.%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Now%20CAS%20then%20holds%20the%20data%20in%20the%20%5BCollectionMembers%5D%20from%20all%20the%20sites.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20941px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100714iE6492C475771DA7F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222.jpg%22%20title%3D%222.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20So%20suppose%20if%20there%20were%20total%207000%20Win7%20machines%20in%20the%20hierarchy.%20What%20we%20will%20see%20on%20CAS%20is%20%3CSTRONG%3EMember%20Count%3C%2FSTRONG%3E%20%3D%207000%20and%20%3CSTRONG%3EMembers%20Visible%3C%2FSTRONG%3E%20%3CSTRONG%3Eon%20site%3C%2FSTRONG%3E%20%3D%207000.%20Taking%20the%20example%20of%20hierarchy%20above%20supposedly%20assuming%20if%20each%20primary%20has%203500%20Win7%20clients%20then%20on%20both%20the%20Primary%20sites%20collection%20view%20will%20show%20%3CFONT%20color%3D%22%230000ff%22%3E%3CSTRONG%3EMember%20Count%3C%2FSTRONG%3E%20%3D%207000%26nbsp%3Band%20%3CSTRONG%3EMembers%20Visible%3C%2FSTRONG%3E%20%3CSTRONG%3Eon%20site%3C%2FSTRONG%3E%20%3D%203500%3C%2FFONT%3E.%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Yes%2C%20the%20primary%20knows%20the%20total%20count%20as%20it%20is%20again%20a%20global%20data%20stored%20in%20%5BCollectionMemberCounts%5D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20majority%20of%20us%20know%20the%20part%20above.%20Let%E2%80%99s%20bring%20in%20the%20tricky%20part.%20Is%20it%20the%20same%20for%20a%20user%20collection%20in%20a%20hierarchy%3F%20You%20guessed%20it%20right%20NO!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20the%20reason%20for%20that%20NO%20is%20we%20don%E2%80%99t%20have%20the%20need%20for%20each%20site%20to%20independently%20send%20the%20data%20to%20CAS%20as%20%3CFONT%20color%3D%22%230000ff%22%3E%3CSTRONG%3EUSERS%20are%20considered%20as%20global%20data%3C%2FSTRONG%3E%3C%2FFONT%3E.%20So%20what%20do%20we%20do%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEverything%20thing%20is%20same%20except%20the%20part%20I%20already%20mentioned.%20We%20just%20select%20a%20single%20site%20to%20send%20the%20membership%20changes%20to%20the%20CAS%20on%20behalf%20of%20all%20other%20primaries.%20So%20that%20special%20primary%20is%20the%20first%20primary%20site%20that%20you%20created%20in%20the%20hierarchy.%3C%2FP%3E%0A%3CP%3ESo%20if%20the%20previous%20admin%20left%20the%20job%2C%20how%20do%20we%20find%20the%20first%20primary%20site%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eselect%20*%20from%20sites%20where%20ReplicatesReservedRanges%20%3D%201%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20the%20above%20will%20give%20you%20the%20first%20primary%20site.%20Coming%20back%20to%20the%20assumed%20hierarchy%2C%20If%20a%20have%20a%20user%20collection%20and%20I%20added%20a%20user%20resource%20in%20PR2%20then%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EPR2%20on%20collection%20evaluation%20will%20update%20its%20CollectionMembers.%20So%20the%20Member%20Count%20on%20PR2%20will%20be%20still%20the%20old%20value%20but%20%E2%80%98Members%20Visible%20on%20Site%E2%80%99%20will%20increase%20by%201%20as%20mentioned%20earlier%20CollectionMemberCounts%20is%20global%20data%20and%20CAS%20still%20does%20not%20know%20of%20this%20addition.%3C%2FLI%3E%0A%3CLI%3EPR1%20on%20collection%20evaluation%20will%20update%20its%20CollectionMembers%20and%20*%3CSTRONG%3Esend%20the%20changes%20to%20the%20CAS%3C%2FSTRONG%3E*.%20The%20Member%20Count%20on%20PR1%20will%20be%20still%20the%20old%20value%20but%20%E2%80%98Members%20Visible%20on%20Site%E2%80%99%20will%20increase%20by%201%20as%20mentioned%20earlier%20CollectionMemberCounts%20is%20global%20data%20and%20CAS%20still%20does%20not%20know%20of%20this%20addition.%3C%2FLI%3E%0A%3CLI%3ECAS%20will%20see%20now%20a%20members%20addition%20via%20DRS%20message%20received%20now%20and%20update%20its%20members%20and%20update%20the%20total%20member%20count%20for%20that%20collection.%3C%2FLI%3E%0A%3CLI%3EThis%20will%20replicate%20back%20to%20the%20Primary%20site%20and%20then%20member%20count%20will%20be%20updated%20on%20them.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20as%20of%20now%20I%20think%20in%20logical%20means%20be%20it%20User%20or%20Device%20collection%20the%20Members%20visible%20on%20site%20cannot%20be%20greater%20than%20total%20Member%20Count.%20We%20are%20done%20with%20the%20concept%20part%20now!%20J%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EComing%20back%20to%20the%20issue%2C%20Why%20are%20CollectionMembers%20not%20replicating%20up%20to%20CAS%20on%20this%20scenario.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20that%20we%20use%20%3CSTRONG%3ESMS_G_System_AppClientState%20class%20%3C%2FSTRONG%3Ein%20the%20collection%20query.%20This%20actually%20corresponds%20to%20fn_ListAppClientState()%20function%20in%20SQL.%20If%20you%20see%20it%E2%80%99s%20definition%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESELECT%20%0A%20%20%20%20%20%20%20%20%20appname.DisplayName%20AS%20AppName%2C%0A%20%20%20%20%20%20%20%20%20ci.CI_ID%20as%20AppCI%2C%0A%20%20%20%20%20%20%20%20%20ci.ModelId%20as%20AppModelID%2C%0A%20%20%20%20%20%20%20%20%20ci.ModelName%20as%20AppModelName%2C%0A%20%20%20%20%20%20%20%20%20sd.Name0%20as%20MachineName%2C%0A%20%20%20%20%20%20%20%20%20us.FullName%20as%20UserName%2C%0A%20%20%20%20%20%20%20%20%20ccs.ComplianceState%20as%20ComplianceState%2C%0A%20%20%20%20%20%20%20%20%20ccs.CIVersion%20as%20Revision%2C%0A%20%20%20%20%20%20%20%20%20sd.ItemKey%20as%20ResourceID%0A%20%20FROM%20%3CFONT%20color%3D%22%230000ff%22%3ECI_CurrentComplianceStatus%3C%2FFONT%3E%20ccs%0A%20%20INNER%20JOIN%20vSMS_ConfigurationItems%20ci%20ON%20ci.ModelId%20%3D%20ccs.ModelID%20AND%20ci.IsLatest%3D1%20AND%20ci.CIType_ID%20%3D%2010%0A%20%20INNER%20JOIN%20System_DISC%20sd%20ON%20sd.ItemKey%20%3D%20ccs.ItemKey%20%0A%20%20INNER%20JOIN%20Users%20us%20ON%20us.UserID%20%3D%20ccs.UserID%0A%20%20LEFT%20JOIN%20fn_LocalizedCIProperties(%40LocaleID)%20AS%20appname%20ON%20ci.CI_ID%20%3D%20appname.CI_ID%3C%2FPRE%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20So%20this%20function%20is%20basically%20telling%20you%20the%20compliance%20state%20for%20an%20application%20installed%20%3CSTRONG%3E%3CU%3Eon%20a%20machine%20by%20a%20user%3C%2FU%3E%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20So%20here%20is%20the%20catch%2C%20CI_CurrentComplianceStatus%20is%20a%20site%20data%20table%20and%20though%20user%20is%20global%20info%2C%20machine%20is%20site%20data.%20We%20will%20replicate%20the%20whole%20site%20data%20up%20in%20the%20CAS.%3C%2FP%3E%0A%3CP%3E-%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Also%2C%20take%20an%20example%20of%20the%20hierarchy%20here%2C%20if%20suppose%20a%20user%20installed%20an%20app%20in%20PR2%20then%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EPR2%20collection%20membership%20will%20update%20and%20it%20will%20update%20the%20CollectionMembers%20locally.%3C%2FLI%3E%0A%3CLI%3EPR1%20on%20its%20evaluation%20of%20this%20collection%20*%3CSTRONG%3Ewill%20not%20find%20any%20changes%3C%2FSTRONG%3E*%20as%20the%20CI_CurrentComplianceStatus%20table%20is%20site%20data%20specific.%20And%20hence%20PR2%20data%20will%20stay%20at%20PR2%20and%20then%20move%20to%20CAS%20but%20not%20known%20to%20PR1.%3C%2FLI%3E%0A%3CLI%3ENow%2C%20Since%20PR1%20is%20the%20first%20site%20it%20will%20not%20replicate%20the%20CollectionMembers%20as%20it%20did%20not%20know%20of%20the%20changes%20of%20insertion%20in%20the%20PR2%20CollectionMembers%20as%20collection%20was%20based%20on%20CI_CurrentComplianceStatus%20which%20is%20site%20data%20specific.%3C%2FLI%3E%0A%3CLI%3ECAS%20will%20not%20know%20of%20any%20members%20being%20added%20and%20will%20also%20not%20update%20its%20CollectionMembers%20and%20increase%20the%20CollectionMembersCount.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20that%E2%80%99s%20the%20issue%20%3A)%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20summarize%20how%20it%20looks%20when%20we%20have%20the%20issue.%20SQL%20queries%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EOn%20PR2%3A%20%3C%2FU%3E%3C%2FSTRONG%3E%5BMembers%20visible%20on%20site%20%26gt%3B%20Member%20count%20%3A)%20%5D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3EConsole%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20945px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100715i01A2D312EF60C90A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%223.jpg%22%20title%3D%223.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CU%3ESQL%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20972px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100716i335247D97089DBC0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%224.jpg%22%20title%3D%224.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EOn%20PR1%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CU%3EConsole%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20944px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100717iF300BB9D2A047A18%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%225.jpg%22%20title%3D%225.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CU%3ESQL%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20969px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100718iFCD7D598F3216B63%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%226.jpg%22%20title%3D%226.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EOn%20CAS%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CU%3EConsole%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20939px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100719iBE5EA9FEA528F8BB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%227.jpg%22%20title%3D%227.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CU%3ESQL%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20969px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F100720i434519FFCED7E14B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%228.jpg%22%20title%3D%228.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EConclusion%3A%3C%2FU%3E%3C%2FSTRONG%3E%20Don%E2%80%99t%20use%20a%20site%20data%20dependent%20criteria%20in%20a%20User%20based%20collection.%20Not%20that%20I%20can%20find%20any%20documentation%20on%20this%20and%20this%20is%20going%20by%20design!%20%3A)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20do%20let%20me%20know%20if%20there%20are%20any%20corrections%20to%20this.%3C%2FP%3E%0A%3CP%3EHope%20it%20helps!%3C%2FP%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CFONT%20color%3D%22%23ff0000%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23000000%22%3E-%3C%2FFONT%3E%3CFONT%20color%3D%22%230000ff%22%3EU%3C%2FFONT%3E%3C%2FSTRONG%3E%3CSTRONG%3EK%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%230000ff%22%3EConfig%3C%2FFONT%3E%3CFONT%20color%3D%22%23ff0000%22%3EMgr%3C%2FFONT%3E%20%7C%20%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2FTheFrankUK%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%40TheFrankUK%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-339949%22%20slang%3D%22en-US%22%3E%3CP%3EFirst%20published%20on%20TECHNET%20on%20Jun%2008%2C%202015%20Hi%20Folks%2CI%20am%20back%20again%20yet%20with%26nbsp%3Ban%20Unexplained%20chain%20%3A)%20This%20one%20helps%20to%20understand%20the%20difference%20between%20evaluation%20of%20a%20user%20collection%20and%20device%20collection.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

First published on TECHNET on Jun 08, 2015
https://blogs.technet.microsoft.com/umairkhan/2015/06/08/configmgr-2012-the-case-of-unexplained-mism...

 

Issue:

=====

Only a single custom user collection (rest others work fine) doesn’t replicate it members up in the hierarchy to CAS. We see 23 members down in that collection and nothing in CAS. We have a CAS and 6 primaries and all these 23 members we are talking belong to a single primary.

 

More details on how the collection is defined. It’s an App collection meant for uninstallation applications. So it detects the application is installed for a machine by a user by the SMS_G_System_AppClientState class. The query used is as described in

http://blogs.technet.com/b/configmgrdogs/archive/2014/11/03/managing-app-v-deployments-in-configmgr-...

 

 

select SMS_R_USER.ResourceID,SMS_R_USER.ResourceType,SMS_R_USER.Name,SMS_R_USER.UniqueUserName,SMS_R_USER.WindowsNTDomain 
from SMS_R_User inner join SMS_G_System_AppClientState on SMS_R_USER.UniqueUserName = SMS_G_System_AppClientState.UserName 
where SMS_G_System_AppClientState.AppName = "APPLICATIONNAME" 
and SMS_G_System_AppClientState.ComplianceState = 1

 

 

Assessment:

=========

Now the basic things that initially comes to mind when the data is there on the child but not there on the CAS is replication. Yes DRS! But we have verified tracking the number and changes for the replication group Collection_Membership being the latest on CAS and links are ACTIVE.

-          VLOGS don’t show any exceptions in processing any record and all looks good. So why the mismatch?? Or What’s happening here?

 

Dissection:

========

Here normal troubleshooting basically will defy and frustrate you unless the evaluation logic is known. I will first explain the concept then we will come back to the issue again.

Suppose we have a hierarchy:

1.jpg

 

Difference between evaluation in a User collection and Device collection:

 

                So collections ([Collections]) are global data, no matter you create them at any site they will replicate to all other sites. [CollectionMembers] as client data are site data. So if I create a collection membership rule for a device collection as all Windows 7 machines on CAS, what happens?

-          Note that there is no CollEval at CAS, and the rule flows down to each primary as global data. The collection membership is locally calculated for each site individually and independently. And once done each sites updates its [CollectionMembers] and send the membership to CAS.

-          Now CAS then holds the data in the [CollectionMembers] from all the sites.

2.jpg

 

-          So suppose if there were total 7000 Win7 machines in the hierarchy. What we will see on CAS is Member Count = 7000 and Members Visible on site = 7000. Taking the example of hierarchy above supposedly assuming if each primary has 3500 Win7 clients then on both the Primary sites collection view will show Member Count = 7000 and Members Visible on site = 3500.

-          Yes, the primary knows the total count as it is again a global data stored in [CollectionMemberCounts]

 

I hope majority of us know the part above. Let’s bring in the tricky part. Is it the same for a user collection in a hierarchy? You guessed it right NO!

 

Now the reason for that NO is we don’t have the need for each site to independently send the data to CAS as USERS are considered as global data. So what do we do?

 

 

Everything thing is same except the part I already mentioned. We just select a single site to send the membership changes to the CAS on behalf of all other primaries. So that special primary is the first primary site that you created in the hierarchy.

So if the previous admin left the job, how do we find the first primary site?

 

 

select * from sites where ReplicatesReservedRanges = 1

 

Yes, the above will give you the first primary site. Coming back to the assumed hierarchy, If a have a user collection and I added a user resource in PR2 then:

  1. PR2 on collection evaluation will update its CollectionMembers. So the Member Count on PR2 will be still the old value but ‘Members Visible on Site’ will increase by 1 as mentioned earlier CollectionMemberCounts is global data and CAS still does not know of this addition.
  2. PR1 on collection evaluation will update its CollectionMembers and *send the changes to the CAS*. The Member Count on PR1 will be still the old value but ‘Members Visible on Site’ will increase by 1 as mentioned earlier CollectionMemberCounts is global data and CAS still does not know of this addition.
  3. CAS will see now a members addition via DRS message received now and update its members and update the total member count for that collection.
  4. This will replicate back to the Primary site and then member count will be updated on them.

 

So as of now I think in logical means be it User or Device collection the Members visible on site cannot be greater than total Member Count. We are done with the concept part now! J

 

Coming back to the issue, Why are CollectionMembers not replicating up to CAS on this scenario.

 

Note that we use SMS_G_System_AppClientState class in the collection query. This actually corresponds to fn_ListAppClientState() function in SQL. If you see it’s definition:

 

SELECT 
         appname.DisplayName AS AppName,
         ci.CI_ID as AppCI,
         ci.ModelId as AppModelID,
         ci.ModelName as AppModelName,
         sd.Name0 as MachineName,
         us.FullName as UserName,
         ccs.ComplianceState as ComplianceState,
         ccs.CIVersion as Revision,
         sd.ItemKey as ResourceID
  FROM CI_CurrentComplianceStatus ccs
  INNER JOIN vSMS_ConfigurationItems ci ON ci.ModelId = ccs.ModelID AND ci.IsLatest=1 AND ci.CIType_ID = 10
  INNER JOIN System_DISC sd ON sd.ItemKey = ccs.ItemKey 
  INNER JOIN Users us ON us.UserID = ccs.UserID
  LEFT JOIN fn_LocalizedCIProperties(@LocaleID) AS appname ON ci.CI_ID = appname.CI_ID

-          So this function is basically telling you the compliance state for an application installed on a machine by a user.

-          So here is the catch, CI_CurrentComplianceStatus is a site data table and though user is global info, machine is site data. We will replicate the whole site data up in the CAS.

-          Also, take an example of the hierarchy here, if suppose a user installed an app in PR2 then:

  1. PR2 collection membership will update and it will update the CollectionMembers locally.
  2. PR1 on its evaluation of this collection *will not find any changes* as the CI_CurrentComplianceStatus table is site data specific. And hence PR2 data will stay at PR2 and then move to CAS but not known to PR1.
  3. Now, Since PR1 is the first site it will not replicate the CollectionMembers as it did not know of the changes of insertion in the PR2 CollectionMembers as collection was based on CI_CurrentComplianceStatus which is site data specific.
  4. CAS will not know of any members being added and will also not update its CollectionMembers and increase the CollectionMembersCount.

 

Yes, that’s the issue :) 

 

To summarize how it looks when we have the issue. SQL queries:

On PR2: [Members visible on site > Member count :) ]

 

Console

3.jpg

SQL

4.jpg

 

On PR1:

 

Console

5.jpg

SQL

6.jpg

 

On CAS:

 

Console

 7.jpg

SQL

8.jpg

 

Conclusion: Don’t use a site data dependent criteria in a User based collection. Not that I can find any documentation on this and this is going by design! :)

 

Please do let me know if there are any corrections to this.

Hope it helps!

 

-UK

ConfigMgr | @TheFrankUK