Disable Windows Update in Windows 10 IoT Core with PowerShell

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:

Disable Windows Update in Windows 10 IoT Core with PowerShell

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:

# set the Windows Update service to "disabled"
sc.exe config wuauserv start=disabled
# display the status of the service
sc.exe query wuauserv
# stop the service, in case it is running
sc.exe stop wuauserv
# display the status again, because we're paranoid
sc.exe query wuauserv
# double check it's REALLY disabled - Start value should be 0x4
REG.exe QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv /v Start

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 PowerShell script remotely

This script needs to run remotely, so, I saved the script into a file named Disable-WindowsUpdate.ps1 and executed it remotely.

Write-Host "Disabling Windows Update on $deviceName..."
Invoke-Command -Session $session -FilePath .\Disable-WindowsUpdate.ps1