Nagios Core 4.3.4
Nsclient 4.3 and up
Asking this again I thought it was working
scriptscheck_windows_updates.ps1 : The module 'scripts' could not be loaded.
For more information, run 'Import-Module scripts'.
At line:1 char:1
+ scripts\check_windows_updates.ps1 $ARG1$ $ARG2$; exit $LastExitCode
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (scripts\check_windows_updates.p
s1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoLoadModule
I have many Machines and they all have the same check only on 5 of them I get the above results.
It shows OK but the results are not valid
Any ideas
Thank you
Tom
Check Windows Updates bad results
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Check Windows Updates bad results
Hi, @kwhogster. You need to put the script in the scripts folder.
This is the command:C:\Program Files\NSClient++\scripts
Then you need to open a powershell console on the windows server as an admin and execute these two commands:check-updates = cmd /c echo scripts\check_windows_updates.ps1; exit $LastExitCode | powershell.exe -command -
Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy ByPass
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Check Windows Updates bad results
Thank you
Just tested on one server and that works now.
I did have the script in c:\program files\nsclient++\scripts\powershell
But I moved it to the scripts folder and used your command
Will check the others later
Will post results.
Thank you
Tom
Just tested on one server and that works now.
I did have the script in c:\program files\nsclient++\scripts\powershell
But I moved it to the scripts folder and used your command
Will check the others later
Will post results.
Thank you
Tom
Re: Check Windows Updates bad results
Update
Got it working on all but two machines.
1, Windows 7 Pro Laptop when I run the script on the laptop directly it never completes.
2. My windows 10 Pro Desktop the same the script never finishes.
For the time being I removed them from the configs.
Any thoughts?
Got it working on all but two machines.
1, Windows 7 Pro Laptop when I run the script on the laptop directly it never completes.
2. My windows 10 Pro Desktop the same the script never finishes.
For the time being I removed them from the configs.
Any thoughts?
Re: Check Windows Updates bad results
Ok I got them working now I found this
https://blog.redbranch.net/2014/01/09/n ... s-updates/
This is a two step approach you set up a scheduled task to check for updates then it writes a file
The Nagios check reads the file and post the results.
Very nice
Please lock this as resolved
https://blog.redbranch.net/2014/01/09/n ... s-updates/
This is a two step approach you set up a scheduled task to check for updates then it writes a file
The Nagios check reads the file and post the results.
Very nice
Please lock this as resolved
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check Windows Updates bad results
glad to hear the issue is resolvedkwhogster wrote:Ok I got them working now I found this
https://blog.redbranch.net/2014/01/09/n ... s-updates/
This is a two step approach you set up a scheduled task to check for updates then it writes a file
The Nagios check reads the file and post the results.
Very nice
Please lock this as resolved
Locking