# Script to shutdown windows IPC

**URL:** <https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [May 5, 2024, 11:28pm UTC](https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933 "2024-05-05T23:28:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hayden\_Perham](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@Hayden\_Perham](https://forum.inductiveautomation.com/u/Hayden_Perham)\
**Post date:** [May 5, 2024, 11:28pm UTC](https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933/1 "2024-05-05T23:28:57Z")

</div>

Hello,

Im looking for a way to shutdown our IPCs in the event of a power outage.  
We are running Vision Edge on IPC HMIs and are going to be adding a DC/DC UPS.

I would like to monitor the status output from the AC/DC power supply feeding the DC/DC UPS from the PLC and trigger a script to shutdown the PC when this faults.  
All machines run Windows OS.

Any ideas much appreciated?

---

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [May 6, 2024, 12:34am UTC](https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933/2 "2024-05-06T00:34:05Z")

</div>

I don't think Ignition can control what the OS is doing... feels like that would be rather dangerous.

---

<div class="post-metadata">

**Author:** ![andrew.budaiev](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.budaiev/32/72921_2.png) [@andrew.budaiev](https://forum.inductiveautomation.com/u/andrew.budaiev)\
**Post date:** [May 6, 2024, 12:55am UTC](https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933/3 "2024-05-06T00:55:58Z")

</div>

FYI  
[Shutdown computer - Ignition - Inductive Automation Forum](https://forum.inductiveautomation.com/t/shutdown-computer/84483)

---

<div class="post-metadata">

**Author:** ![Hayden\_Perham](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@Hayden\_Perham](https://forum.inductiveautomation.com/u/Hayden_Perham)\
**Post date:** [May 6, 2024, 1:02am UTC](https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933/4 "2024-05-06T01:02:21Z")

</div>

Thank for the reply,  
I have looked into third party software but was wondering if we could control it through Ignition instead.

Regarding that post Pturmel states Vision can do it?

> **[@pturmel](https://forum.inductiveautomation.com/u/pturmel)**
>
> Family man. 
> Computer geek and Linux enthusiast (also via Meetup). 
> Electrical Engineer (UMaine '88) and Entrepreneur. 
> Recently joined X fka Twitter. 
> Business inquiries for Automation Professionals' services are welcome (via Pri…

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 6, 2024, 1:21am UTC](https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933/5 "2024-05-06T01:21:21Z")

</div>

Vision can run arbitrary executables on the client machine. You could use a broadcast message from the gateway (monitoring the UPS status) to run a message handler on every client, which would then run the local executable that shuts down the machine.

(I don't keep up with the tools for Windows, but on linux it would simply be the `poweroff` command.)

Note that this approach only works if the client machine is actually running a Vision client. If the Vision client died for any reason, it wouldn't get the broadcast message.

---

<div class="post-metadata">

**Author:** ![Hayden\_Perham](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@Hayden\_Perham](https://forum.inductiveautomation.com/u/Hayden_Perham)\
**Post date:** [May 6, 2024, 1:29am UTC](https://forum.inductiveautomation.com/t/script-to-shutdown-windows-ipc/89933/6 "2024-05-06T01:29:11Z")

</div>

Thank you for the help.

I have created a shutdown batch file and call it with the system.util.execute command.  
This works well.
