Hi everyone, I'm struggling with my first foray into very basic scripting. QNAP have dropped support for my UPS so I'm attempting to get the shutdown command issued by a Windows machine running CyberPower's PowerPanel software.
Code:
echo n | C:\PuTTY\plink.exe -ssh admin@IPADDRESS -pw PASSWORD halt
The batch file works perfectly when I run it from command line but for whatever reason it only works about 1 time in 10 under PowerPanel's responsibility.
Thinking PowerPanel might be a bit sketchy I've run tests with a batch file to open notepad but this runs successfully every time.
Help!