07-26-2012 04:42 PM
Solved! Go to Solution.
07-26-2012 09:26 PM
Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblServices.Caption, tblServices.Name,
tblServices.Pathname, tblServices.Started, tblServices.Startmode,
tblServices.Startname, tblServices.State
From tblComputers Inner Join
tblServices On tblComputers.Computername = tblServices.Computername
Where tblServices.Name = 'termservice'
Order By tblComputers.ComputerUnique
06-25-2018 03:30 PM
07-02-2019 10:38 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
Case tblRegistry.Value
When '0' Then 'Enabled'
When '1' Then 'Disabled'
Else 'Unknown/Custom'
End As Status,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID,
tblAssetGroups
Where tblAssetCustom.State = 1 And tblRegistry.Valuename = 'fDenyTSConnections'
Order By tblAssets.AssetName
Jpatterson wrote:
I tried this and it seems that the table naming has changed since 2012 and I am not versed in SQL nor familiar with the table contents as of today. So I think I figured out another was to "cob" this query together.
1. Go to the scanning tab and select "File & Registry Scanning"
2. Click "Add Registry Scan"
3. set the rootkey drop down to "HKEY_LOCAL_MACHINE
4. set regpath to SYSTEM\CurRentControlSet\Control\Terminal Server
5. set regvalue to fDenyTSConnections
6. scan all assets
7. once the can is complete return to the File & Registry page from the scanning tab and click the report link to the right of the new regestry scann you just added
The pc's with remote desktop locally enabled will return a value of 0 those that are not locally enabled will return a 1.
Feedback on this would be greatly appreciated.
Thanks-
07-30-2012 09:55 PM
SELECT TOP 1000000 tblcomputers.computername,
tblcomputers.computerunique,
tblcomputers.domain,
tblservices.caption,
tblservices.name,
tblservices.pathname,
tblservices.started,
tblservices.startmode,
tblservices.startname,
tblservices.state,
tblcomputers.lastactivescan
FROM tblcomputers
INNER JOIN tblservices
ON tblcomputers.computername = tblservices.computername
WHERE tblservices.name = 'termservice'
AND tblservices.started = 'false'
ORDER BY tblcomputers.computerunique
07-02-2019 10:17 PM
harringg wrote:
Thanks for posting that question (and solution). I was looking to do something similar, but find ones not enabled. I modified the code to show machines with RDS disabled and the last date an active scan was done and it's listed below.SELECT TOP 1000000 tblcomputers.computername,
tblcomputers.computerunique,
tblcomputers.domain,
tblservices.caption,
tblservices.name,
tblservices.pathname,
tblservices.started,
tblservices.startmode,
tblservices.startname,
tblservices.state,
tblcomputers.lastactivescan
FROM tblcomputers
INNER JOIN tblservices
ON tblcomputers.computername = tblservices.computername
WHERE tblservices.name = 'termservice'
AND tblservices.started = 'false'
ORDER BY tblcomputers.computerunique
07-26-2012 10:23 PM
07-26-2012 09:26 PM
Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblServices.Caption, tblServices.Name,
tblServices.Pathname, tblServices.Started, tblServices.Startmode,
tblServices.Startname, tblServices.State
From tblComputers Inner Join
tblServices On tblComputers.Computername = tblServices.Computername
Where tblServices.Name = 'termservice'
Order By tblComputers.ComputerUnique
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now