This post is the fourth in 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 use PowerShell for Disabling Windows Update on Windows 10 IoT Core.
Posts in this series:
- How to Find the IP Address of a Windows 10 IoT Core Device after Initial Flash with PowerShell
- Renaming a Windows 10 IoT Core device via PowerShell
- Installing WiFi drivers in Windows 10 IoT Core with PowerShell
- Disabling Windows Update in Windows 10 IoT Core with PowerShell (this post)
Before we dive into disabling Windows Update, I want to make it clear that I'm not advocating you disable Windows Update. In our circumstance (our lab), it's important that we have an absolute stable environment that doesn't ever change. As a result, we needed to disable Windows Update. In a production scenario, you shouldn't disable Windows Update.
IoT security is a major concern. We're well on our way to having 50 billion (yes, five-oh Billion) IoT devices and each of these devices is a potential security risk. It is incredibly important to keep devices up-to-date because each additional device increases an organization's exposure and surface area for compromise.
With that said, let's dive into disabling Windows Update, against all recommendations and advice.
Disable Windows Update
To disable windows update, I'll be using the same technique used in the previous two posts: remotely execute a PowerShell script. A PowerShell script will be run remotely with Invoke-Command. The code used in the script for disabling windows updates is below:
This script contains a series of commands to disable the Windows Update service, stop it, verify it's been stopped, and verify it's been disabled. The output for this script is below:
Below is all of the code used for Disabling Windows Updates on Windows 10 IoT Core devices. Our next post in the series is setting the display resolution.
Running the Script Remotely
This script needs to run remotely, so, I saved the script into a file named Disable-WindowsUpdate.ps1 and executed it remotely.
In the next post, I'll teach you how to set the screen resolution of Windows 10 IoT core with PowerShell.
Check out our FREE IoT Discovery Session!