Windows check_files without WSH

I’d like to check the age of some log files on a Windows machine. Unfortunately Windows Scripting Host (WSH) is disabled on that machine due to security reasons and I can not use the NSClient “check_files.vbs” and in C:\Program Files\ICINGA2\sbin\ is no corresponding check I could use.

I already searched (Google and this Forum) but wasn’t able to find an alternative way.

Has anybody of you already created a workaround or found a solution for this?

Best
Daniel

Welcome to the Icinga Community.

I’d create a powershell script in this case. But, you may check if there a now similar restrictions in your environment.

1 Like

Hi,

There is also WMI which offers a checkfileage module.

Until I get around writing a HowTo here, see this guide

Cheers,
George

2 Likes

Thank you guys!
Although I haven’t have the check file age in working I can already feel, that I’m on the right track.
With the WMI hint I found this: https://www.rexconsulting.net/wmi-plus-file-checks.html

1 Like