# Dynamic "Turn off the display" based on operation mode

**URL:** <https://forum.inductiveautomation.com/t/dynamic-turn-off-the-display-based-on-operation-mode/55400>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [January 26, 2022, 1:20pm UTC](https://forum.inductiveautomation.com/t/dynamic-turn-off-the-display-based-on-operation-mode/55400 "2022-01-26T13:20:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcolson1590](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mcolson1590](https://forum.inductiveautomation.com/u/mcolson1590)\
**Post date:** [January 26, 2022, 1:20pm UTC](https://forum.inductiveautomation.com/t/dynamic-turn-off-the-display-based-on-operation-mode/55400/1 "2022-01-26T13:20:22Z")

</div>

I will have Ignition 8.1 running on a Windows 10 pc. This is equipment which could sometimes be running off of a UPS. I’d like to adjust Windows “Turn off the display” to me much shorter during these times, or just control the Display Off directly from Ignition. Is this doable?

---

<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:** [January 26, 2022, 1:24pm UTC](https://forum.inductiveautomation.com/t/dynamic-turn-off-the-display-based-on-operation-mode/55400/2 "2022-01-26T13:24:02Z")

</div>

Likely. A vision client timer event could periodically run a powershell script that interrogated Window’s management subsystem and made any desired adjustments. (I’m not a Windows guy, so I only know that PowerShell can do those sorts of things, not actually how.)

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [January 26, 2022, 1:30pm UTC](https://forum.inductiveautomation.com/t/dynamic-turn-off-the-display-based-on-operation-mode/55400/3 "2022-01-26T13:30:11Z")

</div>

You should be able to use [Powercfg](https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options)

Here is an example

```auto
def getScheme():
	import subprocess
	proc = subprocess.Popen(["powershell.exe", "powercfg /getactivescheme"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
	output = proc.stdout.read()
	print output	
getScheme()

```
