cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jdmhw6
Engaged Sweeper II
I'm trying to query devices that are a part of an AD group to see if they're missing a specific registry key.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tsysOS.OSname,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblAssets.AssetID In (Select Top 1000000 tblADComputers.AssetID
From tblADComputers Left Join tblADMembership On
tblADMembership.ChildAdObjectID = tblADComputers.ADObjectID Left Join
tblADGroups On tblADMembership.ParentAdObjectID = tblADGroups.ADObjectID
Where tblADGroups.Name = 'G-Device-WU Workstation Test') And
Not tblRegistry.Regkey Like
'%SOFTWARE\InsertRestOfRegistryKeyHere'
0 REPLIES 0