Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Scripting Remote Server Shutdown

APC UPS for Home and Office Forum

Support forum to share knowledge about installation and configuration of APC offers including Home Office UPS, Surge Protectors, UTS, software and services.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forย 
Showย ย onlyย  | Search instead forย 
Did you mean:ย 
  • Home
  • Schneider Electric Community
  • APC UPS, Critical Power, Cooling and Racks
  • APC UPS for Home and Office Forum
  • Scripting Remote Server Shutdown
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
BillP
Administrator BillP Administrator
2151
Teken
Janeway Teken
99
voidstar_apc
Janeway voidstar_apc
83
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to APC UPS for Home and Office Forum
Solved
Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:24 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

0 Likes
6
2904
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:24 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

Scripting Remote Server Shutdown

Team,

My goal is to be able to script automatic shutdowns using the command file setting option found in the PowerChute Business Edition. Unfortunately (hence the post), I've not gotten this to work correctly.

I'm using Windows 2003 Enterprise Edition (64 bit) with PowerChute Business Edition 7.05 (agent, server, console, connected directly to UPS). I've created two test files (see below) that are both located in the \cmdfiles directory. The first file is a *.cmd file which initiates a *.bat file. Triggering either of these files outside of the APC software initiates the desired action. However, the files do not function as desired when the file is selected and I click on "Test" on the "Configure Shutdown Sequence" screen. Both APC services are logging on with an account that has been given domain admin privileges (heightened privileges to help rule out permissions issues). I do believe that the syntax of both files indicated below is correct. Obviously I have a rather simple batch file at the moment as I want to get it to work correctly before adding any additional variables.

Thanks in advance for your input, thoughts, and ideas.

Colin M. McGroarty

PowerOut.cmd (C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles)_
@echo off
rem
rem Maximize for best viewing
rem This command file provides examples of proper command file syntax
rem
rem Command Files run by PowerChute Business Edition must be placed in this directory.
rem
rem Use the full path name of executable programs and external command files.
rem
rem The @START command must be used to run executable programs (see example below).
rem For the @START command, path names that include spaces must be enclosed in quotes;
rem arguments for the executable must be outside the quotes. A double quote must
rem precede the quoted path name. For example, to execute a command file in
rem c:\Program Files\APC\PowerChute Business Edition\agent\cmdfiles called myShut.exe,
rem the following line should be entered in the command file:
rem
rem @START "" "c:\Program Files\APC\PowerChute Business Edition\agent\cmdfiles\myShut.exe"
rem
@echo on
@START "" "C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles\PowerOut.bat"

PowerOut.bat (C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles)*
C:\WINDOWS\system32\shutdown /s /m \ \apps-01.mcgroarty.net /t 360

Note: Space in above line (\ \) inserted deliberately due to newsgroup formatting

Labels
  • Labels:
  • Universal Transfer Switch
  • Tags:
  • business
  • edition
  • PowerChute
  • script
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:43 AM

0 Likes
0
2901
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:43 AM

Thanks for the input. This tells me that the domain admin account I'm using should suffice and tells me that I do not have an error with the script.

Does anyone have any additional thoughts? I'm assuming such scripting has to be pretty commonplace and would like to hear if anyone else is having any success using this method to shutdown remote systems.

See Answer In Context

Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 6
Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:24 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

0 Likes
0
2902
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:24 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

Hi Guys,

I'm trying to shutdown a mac server using putty and ad the following command

@START "" "C:\windows\putty.exe" -ssh macserver -l root -pw xxx -m c:\shutdownmac.sh

I typed the command in the default.cmd file and did a test .. it doesn't do anything.However when I manually double click on the file it shutdown the mac server.So, putty is working so the command. I've tested a simple command mkdir it works so APC is actually executing the comamnd file. I guess either my syntax is incorrect for APC to understand or something going on.

I've even tried this @START "" "C:\windows\putty.exe" -ssh macserver -l root -pw xxx -m "c:\shutdownmac.sh"

shutdowmac.sh simply contain the following code

shutdown -r now

I'm running windows 2003 server. I tried every thing mentioned in this forum..even google.
Any help will be great

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

0 Likes
0
2902
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

Thank guys. It's working now ๐Ÿ™‚
All I had to do is change login as Domain Administrator under login properties of APC PBE Agent services
And the following code I used

START "" "C:\windows\putty.exe" -ssh macserver -l root -pw xxx -m c:\shutdownmac.sh

Thanks again.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

0 Likes
0
2902
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

Team,

My goal is to be able to script automatic shutdowns using the command file setting option found in the PowerChute Business Edition. Unfortunately (hence the post), I've not gotten this to work correctly.

I'm using Windows 2003 Enterprise Edition (64 bit) with PowerChute Business Edition 7.05 (agent, server, console, connected directly to UPS). I've created two test files (see below) that are both located in the \cmdfiles directory. The first file is a *.cmd file which initiates a *.bat file. Triggering either of these files outside of the APC software initiates the desired action. However, the files do not function as desired when the file is selected and I click on "Test" on the "Configure Shutdown Sequence" screen. Both APC services are logging on with an account that has been given domain admin privileges (heightened privileges to help rule out permissions issues). I do believe that the syntax of both files indicated below is correct. Obviously I have a rather simple batch file at the moment as I want to get it to work correctly before adding any additional variables.

Thanks in advance for your input, thoughts, and ideas.

Colin M. McGroarty

PowerOut.cmd (C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles)_
@echo off
rem
rem Maximize for best viewing
rem This command file provides examples of proper command file syntax
rem
rem Command Files run by PowerChute Business Edition must be placed in this directory.
rem
rem Use the full path name of executable programs and external command files.
rem
rem The @START command must be used to run executable programs (see example below).
rem For the @START command, path names that include spaces must be enclosed in quotes;
rem arguments for the executable must be outside the quotes. A double quote must
rem precede the quoted path name. For example, to execute a command file in
rem c:\Program Files\APC\PowerChute Business Edition\agent\cmdfiles called myShut.exe,
rem the following line should be entered in the command file:
rem
rem @START "" "c:\Program Files\APC\PowerChute Business Edition\agent\cmdfiles\myShut.exe"
rem
@echo on
@START "" "C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles\PowerOut.bat"

PowerOut.bat (C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles)*
C:\WINDOWS\system32\shutdown /s /m \ \apps-01.mcgroarty.net /t 360

Note: Space in above line (\ \) inserted deliberately due to newsgroup formatting

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

0 Likes
0
2903
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

Right click the PowerChute Business Edition Agent service, and check the "allow this service to interact with the desktop" box in the Logon tab, and try your test again. Any change in the results? If you are still having trouble with your script, try something even simpler like creating a directory or something - just to make sure that PowerChute is atleast attempting to run the script.

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

0 Likes
0
2903
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:44 AM

Thank you for the superfast reply.

I can use the APC tool successfully in conjunction with super simple commands, create file for example. Changing the service account from a named account to local service with desktop interaction did not however solve the issue.

Kind Regards,

Colin M. McGroarty

Reply

Link copied. Please paste this link to share this article on your social media post.

Anonymous user
Not applicable

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:43 AM

0 Likes
0
2902
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: โ€Ž2021-06-29 06:25 PM . Last Modified: โ€Ž2024-03-21 03:43 AM

Thanks for the input. This tells me that the domain admin account I'm using should suffice and tells me that I do not have an error with the script.

Does anyone have any additional thoughts? I'm assuming such scripting has to be pretty commonplace and would like to hear if anyone else is having any success using this method to shutdown remote systems.

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

ย 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

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.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings ยฉ 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of