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 License renewal - but why
by  mrusso   Go to last post Go to first unread
Last post: Yesterday at 5:01:47 PM(UTC)
Lansweeper Deployment Package Error Message
by  Brandon  
Go to last post Go to first unread
Last post: Yesterday at 2:04:25 PM(UTC)
Lansweeper Asset Type Mail Server
by  MarkPayton   Go to last post Go to first unread
Last post: Yesterday at 1:03:54 PM(UTC)
Lansweeper Upgrade Win 10 build to version 2004
by  Jean-FB  
Go to last post Go to first unread
Last post: 10/28/2020 7:34:29 PM(UTC)
Lansweeper Uptime only shows Standby
by  Gst4r   Go to last post Go to first unread
Last post: 10/28/2020 4:19:33 PM(UTC)
Lansweeper Excepciones
by  Pablo  
Go to last post Go to first unread
Last post: 10/27/2020 7:35:21 PM(UTC)
Lansweeper Help desk API
by  Skylar@Hennig   Go to last post Go to first unread
Last post: 10/27/2020 5:01:18 PM(UTC)
Lansweeper Helpdesk API
by  Skylar@Hennig  
Go to last post Go to first unread
Last post: 10/27/2020 4:44:50 PM(UTC)