Hi there,
We're attempting to configure NRPE to execute a powershell script on many Windows hosts as a command check and realized that most of the documentation we've found is for NSClient++ and not the (older) NSClient.
Is the older NSClient capable of this?
Our Powershell script sits on the windows-client side and checks disk utilization for volumes. It returns 0, 1, 2, 3.
Thank you much,
Matt
Can PS scripts be executed using NSClient (Not NSClient++)?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can PS scripts be executed using NSClient (Not NSClient+
I believe when calling ps scripts you need to add them to the nsc.ini like so
http://www.nsclient.org/nscp/discussion/message/1371
Code: Select all
cmd /c echo scripts\script.ps1; exit($lastexitcode) | powershell.exe -command -