This post is the fifth of a series describing our automation efforts for provisioning Windows 10 IoT Core on a Raspberry Pi. To recap, KiZAN has a lab of 26 Raspberry Pi 2 boards running Windows 10 IoT Core. On a regular basis, we need to re-flash, provision, and configure the boards. When we perform the re-flash and provisioning process, it is manual, and consumes more time than we want to spend (up to 2 days). In this post, you’ll learn how to set the screen resolution in Windows 10 IoT Core with PowerShell.
Posts in this series:
- Find the IP Address of a Windows 10 IoT Core Device after Initial Flash with PowerShell
- Rename a Windows 10 IoT Core device with PowerShell
- Install WiFi drivers in Windows 10 IoT core with PowerShell
- Disable Windows Update in Windows 10 IoT Core with PowerShell
- Set the Screen Resolution in Windows 10 IoT Core with PowerShell
Why we want to set the screen resolution
In Windows 10 IoT Core, the default screen resolution is set to 640×480. In our lab, the UWP applications we develop prefer a resolution of 1024×768, so we wanted to set the default resolution during our provisioning process.
Set the Screen Resolution
Like the previous three posts, we remotely execute a PowerShell script to set the screen resolution. Check out a previous post to learn how to remotely execute a PowerShell script.
Yeah, that’s it! Just one line of code in this script. PowerShell and Windows 10 IoT Core have a cmdlet that does exactly what I need it to do! After running this script, the output looks like:
This output reminds the user that a restart is needed for these changes to take effect. You’ll learn how to reboot the device in a future post.
Not a big post today, but it’s one step closer to fully-automating our lab provisioning process. The next post in this series will cover setting the time zone in Windows 10 IoT core with PowerShell.
Many thanks to Ryan DiChiara, one of our summer interns for doing a lot of the legwork (and writing) this post!
This doesn’t work. There is no setdisplayresolution command does not work. The link to screen-resolution.ps1… downloads the text line SetDisplayResolution 1024 768. This gives you an error in powershell “The term ‘SetDisplayResolution’ is not recognized as the name of a cmdlet”. this command does not exist in powershell in windows 10…. maybe server 2012 but in windows 10 this doesn’t work.
I still need to do this so if you can come up with a solution that works in Win 10 IOT, that would be great.
not working in windows 10