‎11-07-2019 02:57 PM
‎02-27-2020 10:55 PM
‎02-25-2020 03:09 PM
Nathaniel wrote:
I'm sorry, my bad. This script I posted was the other one that shows only servers without AV. So that's the one we use for checking what servers don't have AV installed. We replaced with this script the original built-in one.
‎02-25-2020 02:44 PM
Nathaniel wrote:
Sorry, that's not correct. The script pulls all servers and gets all information from both the standard antivirus information and from features (presented in WS2016 and higher). If it finds AV information in any of these, it will show it.
It can be modified to contain other information, this is currently how we are using it in our company. So to your needs you may need to adjust it.
We used this logic to update the default report "Server: All servers without anti-virus software", so now we have exact number in the dashboard if there is any server that does not have AV installed or AV feature enabled.
‎02-25-2020 02:59 PM
Mikey! wrote:Nathaniel wrote:
Sorry, that's not correct. The script pulls all servers and gets all information from both the standard antivirus information and from features (presented in WS2016 and higher). If it finds AV information in any of these, it will show it.
It can be modified to contain other information, this is currently how we are using it in our company. So to your needs you may need to adjust it.
We used this logic to update the default report "Server: All servers without anti-virus software", so now we have exact number in the dashboard if there is any server that does not have AV installed or AV feature enabled.
It pulled my only 2 2019 Datacenter Servers for some reason. See picture.
Is it suppose to be pulling everything or just what it thinks doesn't have up to date AV? Maybe I need to modify it. I'd love to replace that standard report with this one.
Thanks!
Mike
Select Top 1000000 unioned.assetid,
tblAssets.AssetName,
tsysOS.Image As icon,
unioned.software,
unioned.version,
unioned.Enabled,
unioned.Uptodate,
unioned.RetrievedFrom,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen
From ((Select a.assetid As assetid,
a.software As software,
a.version As version,
'software comparison' As RetrievedFrom,
'' As Enabled,
'' As Uptodate
From (Select tblSoftware.AssetID As assetid,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version
From tblSoftware
Inner Join tblSoftwareUni On tblSoftware.softID =
tblSoftwareUni.SoftID
Inner Join tsysantivirus On tblSoftwareUni.softwareName Like
tsysantivirus.Software) a)
Union
(Select tblAntivirus.AssetID As assetid,
tblAntivirus.DisplayName As software,
Null As version,
'WMI' As RetrievedFrom,
Case
When tblAntivirus.onAccessScanningEnabled = 1 Then 'Yes'
Else 'No'
End As Enabled,
Case
When tblAntivirus.productUpToDate = 1 Then 'Yes'
Else 'No'
End As Uptodate
From tblAntivirus)) unioned
Inner Join tblAssetCustom On unioned.assetid = tblAssetCustom.AssetID
Inner Join tblAssets On tblAssets.AssetID = unioned.assetid
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblComputersystem.Domainrole >= 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
‎11-23-2021 05:22 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssets.Description,
tblAssets.Lastseen,
tsysOS.Image As icon
From tblAssets
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssets.AssetID Not In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID Inner Join tsysantivirus On
tblSoftwareUni.softwareName Like tsysantivirus.Software) And
tblAssets.AssetID Not In (Select tblAntivirus.AssetID
From tblAntivirus) And tblAssets.AssetUnique Not In (Select
tblAssets.AssetUnique From ((Select a.assetid As assetid,
a.software As software,
a.version As version,
'software comparison' As RetrievedFrom,
'' As Enabled,
'' As Uptodate
From (Select tblSoftware.AssetID As assetid,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version
From tblSoftware
Inner Join tblSoftwareUni On tblSoftware.softID =
tblSoftwareUni.SoftID
Inner Join tsysantivirus On tblSoftwareUni.softwareName Like
tsysantivirus.Software) a)
Union
(Select tblAntivirus.AssetID As assetid,
tblAntivirus.DisplayName As software,
Null As version,
'WMI' As RetrievedFrom,
Case
When tblAntivirus.onAccessScanningEnabled = 1 Then 'Yes'
Else 'No'
End As Enabled,
Case
When tblAntivirus.productUpToDate = 1 Then 'Yes'
Else 'No'
End As Uptodate
From tblAntivirus)
Union
(Select tblFeature.AssetId As AssetID,
tblFeatureUni.featureName As Software,
Null As version,
'Features' As RetrievedFrom,
'' As Enabled,
'' As Uptodate
From tblFeature
Inner Join tblFeatureUni On tblFeature.featUniId =
tblFeatureUni.featUniID And tblFeatureUni.featureCaption in
('Windows Defender','Microsoft Defender Antivirus'))) As unioned Inner Join tblAssetCustom On
unioned.assetid = tblAssetCustom.AssetID Inner Join tblAssets On
tblAssets.AssetID = unioned.assetid Inner Join tsysOS On
tblAssets.OScode = tsysOS.OScode Left Join tsysIPLocations On
tblAssets.LocationID = tsysIPLocations.LocationID
Where tblAssetCustom.State = 1) And tblComputersystem.Domainrole >= 2 And
tblAssetCustom.State = 1
‎03-06-2020 04:01 PM
Nathaniel wrote:
I'm sorry, my bad. This script I posted was the other one that shows only servers without AV. So that's the one we use for checking what servers don't have AV installed. We replaced with this script the original built-in one.
To have a list of servers where AV is installed, you can use this one:Select Top 1000000 unioned.assetid,
tblAssets.AssetName,
tsysOS.Image As icon,
unioned.software,
unioned.version,
unioned.Enabled,
unioned.Uptodate,
unioned.RetrievedFrom,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen
From ((Select a.assetid As assetid,
a.software As software,
a.version As version,
'software comparison' As RetrievedFrom,
'' As Enabled,
'' As Uptodate
From (Select tblSoftware.AssetID As assetid,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version
From tblSoftware
Inner Join tblSoftwareUni On tblSoftware.softID =
tblSoftwareUni.SoftID
Inner Join tsysantivirus On tblSoftwareUni.softwareName Like
tsysantivirus.Software) a)
Union
(Select tblAntivirus.AssetID As assetid,
tblAntivirus.DisplayName As software,
Null As version,
'WMI' As RetrievedFrom,
Case
When tblAntivirus.onAccessScanningEnabled = 1 Then 'Yes'
Else 'No'
End As Enabled,
Case
When tblAntivirus.productUpToDate = 1 Then 'Yes'
Else 'No'
End As Uptodate
From tblAntivirus)) unioned
Inner Join tblAssetCustom On unioned.assetid = tblAssetCustom.AssetID
Inner Join tblAssets On tblAssets.AssetID = unioned.assetid
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblComputersystem.Domainrole >= 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
‎02-24-2020 06:23 PM
‎02-25-2020 01:09 PM
Mikey! wrote:
That script is only pulling 2019 Servers.... And there isn't much data....
‎02-18-2020 02:34 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now