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

PDU Shutdown Scripting

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.

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 Data Center & Enterprise Solutions Forum
  • PDU Shutdown Scripting
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
5060
voidstar_apc
Janeway voidstar_apc
196
Erasmus_apc
Sisko Erasmus_apc
112
Teken
Spock Teken
109
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 Data Center & Enterprise Solutions Forum
Solved
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-06-28 06:35 AM . Last Modified: ‎2024-03-18 01:18 AM

0 Likes
5
1710
  • 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-28 06:35 AM . Last Modified: ‎2024-03-18 01:18 AM

PDU Shutdown Scripting

I've been looking around for what seems like an eternity for a simple script that will turn off an outlet on my PDU and can't find anything of value. I can however find how to do it SNMP but this does not meet my needs. People keep mentioning doing via the CLI but I can't seem to find a clear example on it. I currently have a Smart-ups VT-30 with 8 AP7990 PDUs in my datacenter. I need a script that I can fire off from my environmental monitoring server that will shut down individual outlets on the PDU's. Something in VB would be great. If someone could share their solution I would really appreciate it. I was looking though this forum but couldn't come up with anything.

Labels
  • Labels:
  • Racks, Rack Accessories, & Cooling
  • Tags:
  • management
  • pdu
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
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-06-28 06:36 AM . Last Modified: ‎2024-03-18 01:17 AM

0 Likes
0
1708
  • 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-28 06:36 AM . Last Modified: ‎2024-03-18 01:17 AM

Thanks for all the suggestions but I finally stepped back and just looked at it from a VB perspective and this is what I came up with. This is just a simple example on how to turn off a single outlet but since it is interacting with CLI you just have to step through it and choose what you want from the Menus and adjust the script. I hope it helps someone else.

Option Explicit
'On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
WScript.Sleep 500

'Telnet to PDU IP'
WshShell.SendKeys "telnet (Enter IP or host name here)"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Send Username
WshShell.SendKeys "username"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Send Password
WshShell.SendKeys "password"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Device Manager
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Outlet Management
WshShell.SendKeys "2"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Outlet control
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Enter to Continue
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Outlet Selection
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Control Outlet
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Turn off Outlet
WshShell.SendKeys "2"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500
WshShell.SendKeys "YES"
WScript.Sleep 500
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Turn on Outlet
'shShell.SendKeys "1"
'WshShell.SendKeys ("{Enter}")
'WScript.Sleep 500
'WshShell.SendKeys ("{YES}")
'WScript.Sleep 500
'WshShell.SendKeys ("{Enter}")
'WScript.Sleep 500

See Answer In Context

Reply

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

Replies 5
BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-06-28 06:35 AM . Last Modified: ‎2024-03-18 01:18 AM

0 Likes
0
1708
  • 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-28 06:35 AM . Last Modified: ‎2024-03-18 01:18 AM

we also have some information in the knowledge base that may help

check article FA156163 @ http://www.apc.com/site/support/index.cfm/faq/

Reply

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

voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-06-28 06:35 AM . Last Modified: ‎2024-03-18 01:18 AM

0 Likes
0
1708
  • 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-28 06:35 AM . Last Modified: ‎2024-03-18 01:18 AM

I don't have a great answer to your question but I am curious why SNMP doesn't meet your needs? You want something hard-wired? More secure?

While I don't have a ready-made script, you might want to try "expect". Take a look at [this tutorial|http://oreilly.com/catalog/expect/chapter/ch03.html] to get a flavor for how it works, and if you're in a windows environment, you can use [Expect for Windows|http://docs.activestate.com/activetcl/8.5/expect4win/].

Reply

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-06-28 06:35 AM . Last Modified: ‎2024-03-18 01:17 AM

0 Likes
0
1708
  • 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-28 06:35 AM . Last Modified: ‎2024-03-18 01:17 AM

Thank you so much for your reply. The reason SNMP wont do it for me is because I need to intiate it it from my environmental monitoring solution which isn''t from APC. I had an issue last year that was a little scarry. We lost power for an extended period and it shut down the AC. Problem was the APC kept things running great and shut down all my servers that run powerchute. Problem is that a have a multitude of devices that I can't shut down automatically and it got to be over 102 degrees in the datacenter and a couple devices actually cooked themselves. I'd like to be able to set a threshhold on the environmental server and have it run the script from within that application. SNMP may work I just might not have the know how. I've collected data from SNMP before but haven't forced a process. I will check out your suggestion and post back. Again, Thank you.

Reply

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

voidstar_apc
Janeway voidstar_apc
Janeway

Posted: ‎2021-06-28 06:36 AM . Last Modified: ‎2024-03-18 01:17 AM

0 Likes
0
1708
  • 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-28 06:36 AM . Last Modified: ‎2024-03-18 01:17 AM

>
The reason SNMP wont do it for me is because I need to intiate it it from my environmental monitoring solution which isn''t from APC.
>

Interesting. SNMP isn't tied to APC (in fact, PowerChute doesn't use it). It's a vendor-neutral standard and we document our command-set [in the PowerNet MIB|http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=SFPMIB405&tab=software] (scroll down to where it says PowerNet MIB). If your monitoring solution doesn't directly support SNMP, then perhaps the [Net-SNMP|http://www.net-snmp.org/] set of command-line tools would work for you.

Reply

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

BillP
Administrator BillP Administrator
Administrator

Posted: ‎2021-06-28 06:36 AM . Last Modified: ‎2024-03-18 01:17 AM

0 Likes
0
1709
  • 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-28 06:36 AM . Last Modified: ‎2024-03-18 01:17 AM

Thanks for all the suggestions but I finally stepped back and just looked at it from a VB perspective and this is what I came up with. This is just a simple example on how to turn off a single outlet but since it is interacting with CLI you just have to step through it and choose what you want from the Menus and adjust the script. I hope it helps someone else.

Option Explicit
'On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
WScript.Sleep 500

'Telnet to PDU IP'
WshShell.SendKeys "telnet (Enter IP or host name here)"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Send Username
WshShell.SendKeys "username"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Send Password
WshShell.SendKeys "password"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Device Manager
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Outlet Management
WshShell.SendKeys "2"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Outlet control
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Enter to Continue
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Outlet Selection
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Control Outlet
WshShell.SendKeys "1"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Turn off Outlet
WshShell.SendKeys "2"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500
WshShell.SendKeys "YES"
WScript.Sleep 500
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500
WshShell.SendKeys ("{Enter}")
WScript.Sleep 500

'Turn on Outlet
'shShell.SendKeys "1"
'WshShell.SendKeys ("{Enter}")
'WScript.Sleep 500
'WshShell.SendKeys ("{YES}")
'WScript.Sleep 500
'WshShell.SendKeys ("{Enter}")
'WScript.Sleep 500

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