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

Hi,

We keep our servers in AD groups to track what patching group they are in.

Is there a way to add a query of the computers AD group to the patch tuesday audit?

 

2 REPLIES 2
Mister_Nobody
Honored Sweeper III

I use this:

 Stuff((Select ', ' + tblADGroups.Name As [text()]
    From tblADMembership Inner Join tblADComputers On
          tblADMembership.ChildAdObjectID = tblADComputers.ADObjectID And
          tblassets.AssetID = tblADComputers.AssetID Inner Join tblADGroups On
          tblADMembership.ParentAdObjectID = tblADGroups.ADObjectID
    Where tblADComputers.assetid = tblassets.AssetID And
      tblADGroups.Name Like 'wsus%' For Xml Path('')), 1, 2, '') groups,

Thank you! 

I tried to insert this at the bottom on the patch tuesday audit, but I received an error. 

I'm not super SQL savy, is there a certain area of the code I should insert this into?

 

Invalid SELECT statement. Unexpected token "Stuff" at line 261, pos 3.

General Discussions

Find answers to technical questions about Lansweeper.

New to Lansweeper?

Try Lansweeper For Free

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

Try Now