→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
boupjof
Engaged Sweeper III
This report is for list all active directory group scan by lansweeper and made hyperlink for group detail.

Select Top 1000000 tblADGroups.Name As hyperlink_name_Group,
'http://mylansweeperserver/report.aspx?det=web50usersbyadgroup&title=Active%20Directory%20group:%20'
+ tblADGroups.Name + '&@id=' + Cast(tblADGroups.ADObjectID As nvarchar) As hyperlink_Group,
tblADGroups.Description,
tblADGroups.LastChanged
From tblADGroups
Order By hyperlink_name_Group


Replace "mylansweeperserver" by the name of your Lansweeper server (and the port of the web console in case it isn't port 80).
5 REPLIES 5
Michaelzip0
Engaged Sweeper III

I keep getting 

This site can’t be reached Check if there is a typo in ls.

DNS_PROBE_FINISHED_NXDOMAIN 
 
When I click on any of the group links to see who is all in them

You have to change server name in URL to your own.

Daniel_B
Lansweeper Alumni
@Mister Nobody: I changed your report as well to make it compatible to SQL Compact which does not support the IsNull function.
Mister_Nobody
Honored Sweeper II
Our variant has counter with users and subgroups and pre-Windows 2000 groups handler:
Select Top 1000000 Coalesce(tblADGroups.Name, tblADObjects.sAMAccountName,
'unknown') hyperlink_name_Group,
'http://ls/report.aspx?det=web50usersbyadgroup&title=Active%20Directory%20group:%20'
+ Coalesce(tblADGroups.Name, tblADObjects.sAMAccountName, 'unknown')
+ '&@id=' + Cast(tblADGroups.ADObjectID As nvarchar) As hyperlink_Group,
tblADGroups.Description,
tblADGroups.LastChanged,
Count(tblADMembership.ChildAdObjectID) counter
From tblADGroups
Inner Join tblADObjects On tblADObjects.ADObjectID = tblADGroups.ADObjectID
Inner Join tblADMembership On tblADObjects.ADObjectID =
tblADMembership.ParentAdObjectID
Group By tblADGroups.Description,
tblADGroups.LastChanged,
tblADObjects.sAMAccountName,
tblADGroups.Name,
tblADGroups.ADObjectID
Order By hyperlink_name_Group
Susan_A
Lansweeper Alumni
Thank you for the contribution, boupjof. I did replace the varchar entry in your report with nvarchar, as SQL Compact databases don't recognize varchar values. They only support nvarchar.