‎05-01-2015 06:40 PM
Solved! Go to Solution.
‎05-04-2015 11:47 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblADGroups.Name
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblADMembership On tblADusers.ADObjectID =
tblADMembership.ChildAdObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name Like '%your group%' And tblAssets.Lastseen = GetDate() -
3 And tblAssetCustom.State = 1
‎05-11-2015 11:11 AM
‎05-08-2015 11:42 AM
‎05-04-2015 11:47 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblADGroups.Name
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblADMembership On tblADusers.ADObjectID =
tblADMembership.ChildAdObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name Like '%your group%' And tblAssets.Lastseen = GetDate() -
3 And tblAssetCustom.State = 1
‎05-08-2015 10:33 PM
Daniel.B wrote:
Normally the report builder automatically creates links between two tables if you doubleclick on the table you would like to add. Only in some cases, you have to manually link them by drag and drop: Pull the column of one table onto it's matching counterpart of the other table. For information on which data is stored in which table, refer to the Database Dictionary. In this case, you would add tblADusers to your report and link tblAssets.Username to tblADusers.username and tblAssets.Userdomain to tblADusers.Userdomain. Afterwards, add tblADMembership and connect tblADusers.ADobjectID to tblADMembership.ChildADObjectID. Now add tblADgroups to your report and connect tblADMembership.ParentADObjectID to tblADgroups.ADobjectID. Now select tblADgroups.name to be displayed in your report and add a filter criterium to it. You might filter on the Last seen date of the asset as well in order to deploy only to computers which have recently been scanned.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblADGroups.Name
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblADMembership On tblADusers.ADObjectID =
tblADMembership.ChildAdObjectID
Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Where tblADGroups.Name Like '%your group%' And tblAssets.Lastseen = GetDate() -
3 And tblAssetCustom.State = 1
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now