APC UPS Data Center & Enterprise Solutions Forum
Schneider, APC support forum to share knowledge about installation and configuration for Data Center and Business Power UPSs, Accessories, Software, Services.
Posted: 2021-06-29 04:41 AM . Last Modified: 2024-03-13 01:35 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-29 04:41 AM . Last Modified: 2024-03-13 01:35 AM
Hello!
I am having trouble to get powerchute to execute a simple bat file on shutdown. My bat file is very simple and works if I run it from command line, but not if it's run by powershute.
The content of my bat file looks like this:
@START C:\plink\plink.exe -ssh -P 222 -pw MyPassword root@MyServer sudo shutdown -h now
I have selected the bat file to be run in powerchute web gui, and when I hit "test" I get the message that the script has been executed, but it hasn't.
I have also tried this path and syntax which is exactly as described in the example bat file made by APC
@START "" "C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles\plink.exe" -ssh -P 222 -pw MyPassword root@MyServer sudo shutdown -h now
This one also works if I run it in command line, but not through powerchute.
What seems to be the issue?
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-29 04:41 AM . Last Modified: 2024-03-13 01:34 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-29 04:41 AM . Last Modified: 2024-03-13 01:34 AM
Hello and thanks for the reply. I changed the "logged on" user to administrator and now it works. Thanks for the fix!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-29 04:41 AM . Last Modified: 2024-03-13 01:34 AM
Hi,
When you execute the file from the command line the permissions applied are that of the user you are log in as. When PowerChute executes the script the permissions applied are local system account permissions. Open the PowerChute Agent service and change the user to one that has permission to shutdown the server.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-29 04:41 AM . Last Modified: 2024-03-13 01:34 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-06-29 04:41 AM . Last Modified: 2024-03-13 01:34 AM
Hello and thanks for the reply. I changed the "logged on" user to administrator and now it works. Thanks for the fix!
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.