What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

WINDOWS UPDATES STATUS (POWERSHELL) SENSOR is not working - PE018

Votes:

0

Hello,

since few weeks we have problems with the Windows Update Status Sensor. Four Exchange Severs all in the same enviroment are reporting back, error PE018

- Log File *.log

$searcher = (New-Object -ComObject Microsoft.Update.Session).CreateUpdateSearcher();$searcher.Search("Type='Software'").Updates | Sort-Object -Property Dates -Descending | ft -autosize IsInstalled, MsrcSeverity
0:

IsInstalled MsrcSeverity
----------- ------------
       True             
       True Important   
       True             
       True             
       True Moderate    
       True             
       True             
       True Critical    
       True             
       True             



$([int]$($((get-date).ToUniversalTime()) - ($searcher.QueryHistory(0, 1) | Select-Object Date).Date).TotalSeconds)
0:
2511597

- Log File *.txt

Data['blockedsens'].asString := '';
Data['canlinux'].asString := '0';
Data['channelinfos'].asString := '{"1":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""},"2":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"-1","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":"0.2"},"3":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""},"4":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"-1","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":"0.2"},"5":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""},"6":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"-1","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":"0.2"},"7":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""},"8":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"-1","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"0.2","LimitMaxWarning":""},"9":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"0","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"","LimitMaxWarning":""},"10":{"Unit":"oukCount","CustomUnit":"","ValueLookupName":"","LimitMode":"-1","LimitMinError":"","LimitMinWarning":"","LimitMaxError":"0.2","LimitMaxWarning":""},"11":{"Unit":"oukTimeSeconds","CustomUnit":"","ValueLookupName":"","LimitMode":"-1","LimitMinError":"","LimitMinWarning":"0","LimitMaxError":"","LimitMaxWarning":"2592000"}}';
Data['channelnames'].asString := 'Windows Updates Installed'#$D#$A + 
'1'#$D#$A + 
'Windows Updates Missing'#$D#$A + 
'2'#$D#$A + 
'Security Updates (Low) Installed'#$D#$A + 
'3'#$D#$A + 
'Security Updates (Low) Missing'#$D#$A + 
'4'#$D#$A + 
'Security Updates (Moderate) Installed'#$D#$A + 
'5'#$D#$A + 
'Security Updates (Moderate) Missing'#$D#$A + 
'6'#$D#$A + 
'Security Updates (Important) Installed'#$D#$A + 
'7'#$D#$A + 
'Security Updates (Important) Missing'#$D#$A + 
'8'#$D#$A + 
'Security Updates (Critical) Installed'#$D#$A + 
'9'#$D#$A + 
'Security Updates (Critical) Missing'#$D#$A + 
'10'#$D#$A + 
'Time since last update'#$D#$A + 
'11'#$D#$A + 
'';
Data['environment'].asString := '';
Data['exefile'].asString := 'LastWindowsUpdateSensor.exe';
Data['exeparams'].asString := ' -host="*" -timeout=43198 -port=5985 -user="*" -pass="*" "-debugfile=C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)\Result of Sensor 43733.log"';
Data['fastcount'].asString := '0';
Data['host'].asString := '****';
Data['hostv6'].asString := '';
Data['inerror'].asString := '1';
Data['interfacenumber'].asString := '';
Data['inum'].asString := '';
Data['ipversion'].asString := '0';
Data['isexesensor'].asString := '1';
Data['lastmsg'].asString := '#O18';
Data['lastuptime'].asString := '0';
Data['linuxlogindomain'].asString := '';
Data['linuxloginpassword'].asString := '***';
Data['monitorchange'].asString := '';
Data['mutexname'].asString := '';
Data['reboot'].asString := '42704.7191784028';
Data['reqmsginterval'].asString := '43200';
Data['requiredotnetversion'].asString := '40';
Data['resultfile'].asString := 'Result of Sensor 43733.txt';
Data['sensorid'].asString := '43733';
Data['simulate'].asString := '0';
Data['timeout'].asString := '1140';
Data['tlsexplicit_default'].asString := '';
Data['tlsexplicit_ftp'].asString := '';
Data['tlsexplicit_imap'].asString := '';
Data['tlsexplicit_pop3'].asString := '';
Data['tlsexplicit_port'].asString := '';
Data['tlsexplicit_smtp'].asString := '';
Data['uptimecount'].asString := '0';
Data['usednstime'].asString := '0';
Data['usewindowsauthentication'].asString := '';
Data['windowslogindomain'].asString := '*';
Data['windowsloginpassword'].asString := '*';
Data['windowsloginusername'].asString := '*';
Data['writeresult'].asString := '1';

I tried to run the powershell command direct on the host

$searcher = (New-Object -ComObject Microsoft.Update.Session).CreateUpdateSearcher();$searcher.Search("Type='Software'").Updates

after few hours no results were reported back and I could see 30% CPU usage plus 1.5 GB RAM

I set up the Powershell Limits from 1024 to 2048. Restart all services, BITS Windows Updates, WinRM etc, didn't help

Manual search for Updates works like a charm.

I appreciate your support

Kind regards,

powershell prtg sensor wsus

Created on Dec 6, 2016 12:09:30 PM

Last change on Dec 7, 2016 7:25:02 AM by  Stephan Linke [Paessler Support]



6 Replies

Votes:

0

How long does... Measure-Command { $searcher = (New-Object -ComObject Microsoft.Update.Session).CreateUpdateSearcher();$searcher.Search("Type='Software'").Updates } ...take to execute? What interval is configured on the sensor? 24h I assume?

Created on Dec 7, 2016 7:27:20 AM by  Stephan Linke [Paessler Support]



Votes:

0

PS WSMan:\localhost\Plugin> Measure-Command { $searcher = (New-Object -ComObject Microsoft.Update.Session).CreateUpdateS
earcher();$searcher.Search("Type='Software'").Updates }


Days              : 0
Hours             : 1
Minutes           : 34
Seconds           : 38
Milliseconds      : 11
Ticks             : 56780117599
TotalDays         : 0,0657177287025463
TotalHours        : 1,57722548886111
TotalMinutes      : 94,6335293316667
TotalSeconds      : 5678,0117599
TotalMilliseconds : 5678011,7599

Created on Dec 8, 2016 7:41:08 AM

Last change on May 24, 2017 10:14:31 AM by  Luciano Lingnau [Paessler]



Votes:

0

Sensor interval is set to 6H.

During the Win Update Check from that script, which was running for more than 90 mins, we had a CPU Load from 30 % and a Memory Usage from 1.5 GB

Do we have a more efficient solution for that check ?

Regards

Created on Dec 8, 2016 7:42:49 AM



Votes:

0

A workaround can be found here in Step 4 of this guide :)

Created on Dec 8, 2016 7:49:49 AM by  Stephan Linke [Paessler Support]



Votes:

0

The problem here was the WSUS Server. He was replying with big delay as a result we had the error.

THank you for helping me find the solution here.

A good maintenance from WSUS, clean old updates - give more resources, have solved the problem

Created on Jan 13, 2017 8:36:39 AM



Votes:

0

Ah, nice - thanks for the hint, might be useful for others :)

Created on Jan 13, 2017 8:52:42 AM by  Stephan Linke [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.