→ 🚀Are you a Lansweeper Champion?! Join our Contributor Program Sign up here!

Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Glenn_Gagne
Engaged Sweeper III

Hi have to generate a report of assets based on their Windows update statue, but I also need to put in the report group their group membership for "some groups" only... but also need to find some other machine that they are not members of these groups. In fact, the group membership should not be a filter (where), but I just need to show some groups I use. Something like that:

 

AssetPatch StatusDomainIsMemberOfSomeWUGroupsLasttried...
PC1Up To Datemydomain.comWU group - monday 
PC2Up To Datemydomain2.com(null) 
PC3Out of Date(empty) ** Workgroup ***** no group, not in an AD *** 

I tried some way, but the command goes in error or consume CPU at 100% (impossible to resolve)

Basically, it's the same report that Lansweeper team share every months for Windows Update plus a personnalized touch to follow our ring deployment based on groups membership... But some machines that are in WORKGROUP or those on the "regular" ring are just not in a group (default).

The request I tested where is near of my goal generate multiple lines for all asset, one per existing groups associated on the asset... not what I need.

 

1 REPLY 1
Mister_Nobody
Honored Sweeper II

Try add code from this report (from stuff to groups):

 

Select Top 1000000 tblADObjects.domain,
  tblADObjects.samaccountname,
  Stuff((Select ', ' + tblADGroups.Name As [text()]
    From tblADMembership Inner Join tblADGroups On
          tblADMembership.ParentAdObjectID = tblADGroups.ADObjectID Inner Join
      tblADcomputers On tblADMembership.ChildAdObjectID =
          tblADcomputers.ADObjectID
    Where adc.ADObjectID = tblADcomputers.ADObjectID For Xml Path('')), 1, 2,
  '') Groups
From tblADMembership As admem
  Inner Join tblADGroups On admem.ParentAdObjectID = tblADGroups.ADObjectID
  Inner Join tblADcomputers As adc On admem.ChildAdObjectID = adc.ADObjectID
  Inner Join tblADObjects On adc.ADObjectID = tblADObjects.ADObjectID
Group By tblADObjects.domain,
  tblADObjects.samaccountname,
  adc.ADObjectID

 

 

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now