On 2012 and 2016 hosts everything is working fine as shown here: On 2019 hosts no matter what I always get a return code of 0 and no status text, but I can run it locally and it works fine:
Code: Select all
Microsoft Windows [Version 10.0.17763.2061]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\xxxx>powershell -ExecutionPolicy Bypass -File "c:\Program Files (x86)\Nagios\NCPA\plugins\check_last_update.ps1" 30
OK: 3 since last update
C:\Users\xxxx>