This topic contains 3 replies, has 2 voices, and was last updated by
December 8, 2017 at 8:14 pm #87995ParticipantPoints: 0Rank: Member
Are there any PowerShell commands / features to alter display settings? In particular, I am trying to automate the toggling of the new HDR settings in Windows 10 FCU described here:
December 9, 2017 at 10:25 pm #88297ParticipantPoints: 320Rank: Contributor
The are no built-in PoSH cmdlets, functions to address this that I am aware of.
Looking around on the MSDN, TechNet uncovers developer specific info on HDR what it is a why, even sample code for Devs.
But, general interaction with those settings, not something readily available.
I don't have a HDR capable device to toy with to figure out what is really possible, maybe someone else in the forum might.
Yet, it appears that you are going to have to dig at it to find a hook into it.
December 11, 2017 at 5:51 pm #88673ParticipantPoints: 0Rank: Member
Thanks! I explored some more, and it looks like this API is available:
Now, I have to figure out if it is possible to call the UWP APIs using a PowerShell script. I have never tried that before.
December 11, 2017 at 8:50 pm #88702ParticipantPoints: 320Rank: Contributor
Good to see you found additional info. Ditto, on the UWP thing. Note the apps (those normally Start Menu -like things) are secure containerized apps. So, that may present an additional hurdle. PowerShell was not meant to be a GUI / interactive app controller. Other tool like AutoIT, AutoKey and the like have their own scripting implementation for such things.
Now, with what you found, if you can find an handy class available, you can use Add-Type to use it in PoSH. Yet, like we've both stated, experimentation is the path.
A quick search on the string...
'c# Windows.Foundation.UniversalApiContract sample'
Returns the following...
Windows Universal Platform SDK API contracts
How to call UWP APIs from a desktop VB/C# app
Using Windows 8* WinRT API from desktop applications
The topic ‘Altering Windows 10 FCU Display Settings with Powershell?’ is closed to new replies.