Notification

Icon
Error

Report to find ScanServer 'not working' - Broken WMI on Windows device block scanserver

Posted: Thursday, October 1, 2020 8:07:26 AM(UTC)
Rocher Vincent

Rocher Vincent

Member Original PosterPosts: 4
0
Like
Hello,
I have created a reports to find ScanServer that 'stop' scanning because of WMI broken on windows assets.

The reports show the name of ScanServer where processing is 0 and In Queue more than 200.

I use it with Scheduled task to reboot the 'guilty', i know that is not THE solution, but i couln't repair broken WMI at night.

Vincent

Code:
Select Top 10000 tsysOS.Image As icon,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tsysCurrentScans.ScanType,
  Count(tsysCurrentScans.ScanType) As Num
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
  Inner Join tsysASServers On tsysASServers.Servername = tblAssets.AssetName
  Inner Join tsysCurrentScans On tsysASServers.Servername =
    tsysCurrentScans.Scanserver
Where tsysCurrentScans.ScanType = 1 And tsysASServers.Servicelastpolled >
  GetDate() - 7 And tblAssetCustom.State = 1 And Not Exists(Select Top
        10000 tsysOS.Image As icon,
        tblAssets.AssetID,
        tblAssets.AssetName,
        tsysCurrentScans.ScanType
      From tblAssets Inner Join tblAssetCustom On tblAssets.AssetID =
          tblAssetCustom.AssetID Inner Join tsysOS On tsysOS.OScode =
          tblAssets.OScode Inner Join tsysASServers On
          tsysASServers.Servername = tblAssets.AssetName Inner Join
        tsysCurrentScans On tsysASServers.Servername =
          tsysCurrentScans.Scanserver
      Where tsysCurrentScans.ScanType = 2 And tsysASServers.Servicelastpolled >
        GetDate() - 7 And tblAssetCustom.State = 1)
Group By tsysOS.Image,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tsysCurrentScans.ScanType
Having Count(tsysCurrentScans.ScanType) > 199

Active Discussions

Lansweeper Last used system of users in a specific OU
by  chriscornelis   Go to last post Go to first unread
Last post: Yesterday at 11:11:35 AM(UTC)
Lansweeper Trying to display different versions of software
by  TimHolmes1973  
Go to last post Go to first unread
Last post: 10/28/2020 8:54:04 PM(UTC)
Lansweeper Switch & Port reports - SNMPInfo tables missing info
by  Maxlieb   Go to last post Go to first unread
Last post: 10/28/2020 1:02:24 PM(UTC)
Lansweeper Last Patch Date
by  Dan S   Go to last post Go to first unread
Last post: 10/26/2020 2:27:47 PM(UTC)
Lansweeper Webcam report, the wrong way
by  TimHolmes1973  
Go to last post Go to first unread
Last post: 10/23/2020 4:38:45 PM(UTC)
Lansweeper zerologin posted report
by  hanslepire   Go to last post Go to first unread
Last post: 10/23/2020 8:50:59 AM(UTC)
Lansweeper Need help finishing a report for Failed Logons
by  Helpdesk15  
Go to last post Go to first unread
Last post: 10/20/2020 3:10:33 PM(UTC)