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-07-01 01:47 AM . Last Modified: 2024-03-06 12:13 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:47 AM . Last Modified: 2024-03-06 12:13 AM
I just purchased a Back-UPS (BE750G) and installed PowerChute Personal Edition. Is there any way I can pull information from PowerChute via a script? Does PowerChute write the the Windows event log? I was thinking about writing a powershell script to email me when it goes on battery power. I'm not sure if the UPS beep will wake me up if I'm asleep, and I won't receive a notification if I'm away from my home office. Is there a WMI object I can access since the battery is connected via USB? I'm really looking for any way to get battery/power status for scripting. Thanks!
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:47 AM . Last Modified: 2024-03-06 12:13 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:47 AM . Last Modified: 2024-03-06 12:13 AM
I have set up email notification for UPS events triggered by entries that PowerChute Personal Edition writes in the Event Log.
All information below is based on my implementation on Windows 7 Professional. I expect it works on other Windows 7 versions but I have not tested it on anything else.
The following UPS-related events are the ones I use to trigger email alerts:
Application Log / Event ID 174 (Battery backup transferred to battery power due to a blackout.)
Application Log / Event ID 61455 (Battery backup transferred to AC utility power.)
System Log / Event ID 13 (The operating system is shutting down at system time ?2012?-?12?-?10T22:09:22.256932100Z.) - the email may or may not get sent out for this event,
depending on the timing of shutting down the SMTP server used to relay the email.
Open Event Viewer and locate an instance of the Event ID for which you want to send an email notification. You may need to remove AC power from your UPS input to generate Events 174 and 61455 if you don't already have any instances in your Event Log. Right-click on the event and select "Attach task to this event."
Add a description if you wish and click Next, then Next again.
Click the button for "Send an e-mail" and click Next.
Fill out the From, To, Subject, and SMTP Server. I send from myself to myself and put a brief description of the event (i.e., Computer on Battery) in the subject and leave the message field blank.
For SMTP server, enter 127.0.0.1 to use a local SMTP relay server.
Mke sure the box is checked to "Open the properties dialog for this task when I click Finish," then click Finish.
On the General tab I have clicked on the button to Run whether user is logged on or not and ticked the box to Run with highest priveleges. (My account is an admin acct.)
On the Conditions tab I have unchecked the box to Start the task only if the computer is idle ... and Start the task only if the computer is on AC power.
On the Settings tab I have checked Allow task to be run on demand (so I can easily test it), Stop the task if it runs longer than [1 hour, the minimum], and If the running task
does not end when requested, force it to stop, I have unchecked all the other boxes.
If you already have an SMTP relay server running, you are done. If you don't have one, you can download one free here:
http://www.windows7download.com/win7-free-smtp-server/dxnrjvpv.html
Note: This Free SMTP Server does not run as a service. It must be started in order to relay email messages. I put a shortcut for it into my Startup folder and start it minimized.
I hope this information may be of use to someone else.
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-07-01 01:47 AM . Last Modified: 2024-03-06 12:13 AM
i locked your other thread since it was a duplicate and this one is located in the correct spot.
we can refer to it here: Referenced content removed
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:47 AM . Last Modified: 2024-03-06 12:13 AM
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-07-01 01:47 AM . Last Modified: 2024-03-06 12:13 AM
I have set up email notification for UPS events triggered by entries that PowerChute Personal Edition writes in the Event Log.
All information below is based on my implementation on Windows 7 Professional. I expect it works on other Windows 7 versions but I have not tested it on anything else.
The following UPS-related events are the ones I use to trigger email alerts:
Application Log / Event ID 174 (Battery backup transferred to battery power due to a blackout.)
Application Log / Event ID 61455 (Battery backup transferred to AC utility power.)
System Log / Event ID 13 (The operating system is shutting down at system time ?2012?-?12?-?10T22:09:22.256932100Z.) - the email may or may not get sent out for this event,
depending on the timing of shutting down the SMTP server used to relay the email.
Open Event Viewer and locate an instance of the Event ID for which you want to send an email notification. You may need to remove AC power from your UPS input to generate Events 174 and 61455 if you don't already have any instances in your Event Log. Right-click on the event and select "Attach task to this event."
Add a description if you wish and click Next, then Next again.
Click the button for "Send an e-mail" and click Next.
Fill out the From, To, Subject, and SMTP Server. I send from myself to myself and put a brief description of the event (i.e., Computer on Battery) in the subject and leave the message field blank.
For SMTP server, enter 127.0.0.1 to use a local SMTP relay server.
Mke sure the box is checked to "Open the properties dialog for this task when I click Finish," then click Finish.
On the General tab I have clicked on the button to Run whether user is logged on or not and ticked the box to Run with highest priveleges. (My account is an admin acct.)
On the Conditions tab I have unchecked the box to Start the task only if the computer is idle ... and Start the task only if the computer is on AC power.
On the Settings tab I have checked Allow task to be run on demand (so I can easily test it), Stop the task if it runs longer than [1 hour, the minimum], and If the running task
does not end when requested, force it to stop, I have unchecked all the other boxes.
If you already have an SMTP relay server running, you are done. If you don't have one, you can download one free here:
http://www.windows7download.com/win7-free-smtp-server/dxnrjvpv.html
Note: This Free SMTP Server does not run as a service. It must be started in order to relay email messages. I put a shortcut for it into my Startup folder and start it minimized.
I hope this information may be of use to someone else.
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.