cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New members of AD group

Ken1
Engaged Sweeper II

Hi,

Is it possible to make a report, to see new members in a group?

I use this script below to get a report of "Domain admins" members... but I would like to only see new members

 

Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Name,
tblADusers.Displayname,
tblADGroups.Name As [Group]
From tblADMembership
Inner Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name = 'Domain Admins'
Order By tblADusers.Userdomain,
tblADusers.Username

2 REPLIES 2

Ken1
Engaged Sweeper II

Now i just need this to work 🙂 

 
-------------------------
Could this be implemented?

I have a scanning for a specific group, and would like to scan every 5-10 min. like i can schedule in other scan types.

Would be GREAT, so we actually could use LanSweeper as an AD change monitor also.
-------------------------

ErikT
Lansweeper Tech Support
Lansweeper Tech Support

@Ken1 I updated the Label to Report Center as your question will likely get more traction there.

How will you distinguish the new users from existing users?

eg. You check for all users that have been changed in the last 7 days

Select Top 1000000 tblADusers.Username,
  tblADusers.Userdomain,
  tblADusers.Firstname,
  tblADusers.Lastname,
  tblADusers.Name,
  tblADusers.Displayname,
  tblADGroups.Name As [Group],
  tblADusers.whenCreated,
  tblADusers.whenChanged
From tblADMembership
  Inner Join tblADusers On tblADMembership.ChildAdObjectID =
      tblADusers.ADObjectID
  Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
      tblADGroups.ADObjectID
Where tblADGroups.Name = 'Domain Admins' And tblADusers.whenChanged Between
  GetDate() - 7 And GetDate()
Order By tblADusers.Userdomain,
  tblADusers.Username