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
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