Last active
July 22, 2019 10:23
-
-
Save bobalob/09df72b1dc408bd90158861dfa0c552d to your computer and use it in GitHub Desktop.
Temporarily disable WSUS to install App Compatibility FOD in Server 2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get current WSUS setting | |
$existingValue = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer).UseWUServer | |
# Disable WSUS | |
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value 0 | |
# Restart WSUS | |
Restart-Service wuauserv | |
# Install the pack | |
Add-WindowsCapability -Online -Name ServerCore.AppCompatibility~~~~0.0.1.0 | |
# Set WSUS back to original setting (probably 1) | |
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value $existingValue | |
# Restart WSUS | |
Restart-Service wuauserv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment