This PowerShell test returns the days since last updates have been installed.
It takes the Windows machine name as parameter.
Works for me on W2K12R2 and up, as well as Windows 10.
Thank you.
But now HostMonitor offers built-in test method for such check (version 12.56).
Also version 12.60 will check for "reboot pending" flags (should be available next week).
KS-Soft wrote:But now HostMonitor offers built-in test method for such check (version 12.56).
Also version 12.60 will check for "reboot pending" flags (should be available next week).
Of course, I am very aware of that.
However, I find the built-in test not quite accurate enough.
At this moment, I have a server that says 40 days with the built-in test, 20 days with my PS test.
When I look at the actual Windows update history, it is in fact 20 days....
How do you handle the credential if HM or RMA does not have access permission for the checked system? As I see, you don't pass the credential info to the script and using the connection manager is not an option for this situation to pass the credential.
I had used a similar script before Windows Update test was implemented. However, due to credential problem, I could only check the systems that HM or RMA service account has access right. Because I did not want the credential info to pass to or embed into the script, other systems were left unchecked.
On the other hand, I suspected some unexpected result for this test similar to yours. However, I have not examined yet.
oakyuz wrote:How do you handle the credential if HM or RMA does not
have access permission for the checked system?
That is an issue indeed.
I kinda solved it by passing the credentials Base64 encoded en decode it back in the script itself.
Which I know is quite easy to decipher, but still better than nothing.
For my scenario it was acceptable, I can imagine it will not be in many other cases....