Windows Updates don't work after blocked all inbound and outbound traffic

SC 236 Reputation points
2024-01-22T10:19:42.6066667+00:00

Hi, I blocked all inbound and outbound traffic using PowerShell:

Set-NetFirewallProfile -All -DefaultInboundAction Block -DefaultOutboundAction Block

I allowed Windows Updates using the following command, but the updates don't work.

New-NetFirewallRule -DisplayName 'Allow Windows Updates' -Profile Any -Direction Outbound -Action Allow -Protocol Any -LocalPort Any -RemotePort Any -Program '%SystemRoot%\ImmersiveControlPanel\SystemSettings.exe' -Service 'wuauserv'

Only an error is displayed: "We couldn't connect to the update service. We'll try again later, or you can check now. If it still doesn't work, make sure you're connected to the Internet."

It is virtual machine with Windows Server 2019.

Can you advise me what else needs to be allowed, please? WindowsUpdates_Error

Windows for business | Windows Server | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Wesley Li 11,285 Reputation points
    2024-01-24T09:15:42.7366667+00:00

    Hello

    We may need to allow the following urls:

    Step 2 - Configure WSUS | Microsoft Learn If the issue persists, we could open administrator powershell command line and run "get-windowsupdatelog" to check the failed details for more information.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.