0

Since today 2021-07-21 my temp rule activated via powershell seems don't work anymore i receive the following error:

PS C:\WINDOWS\system32> New-NetFirewallRule -DisplayName "Block Outbound Port 80" -Direction Outbound -LocalPort 80 -Protocol TCP -Action Block
New-NetFirewallRule : The requested object could not be found.
At line:1 char:1
+ New-NetFirewallRule -DisplayName "Block Outbound Port 80" -Direction  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (MSFT_NetFirewallRule:root/standardcimv2/MSFT_NetFirewallRule) [New-NetFirewallRule], CimException
    + FullyQualifiedErrorId : MI RESULT 6,New-NetFirewallRule

This example is also mentioned into https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=windowsserver2019-ps

looks like the final part trig error : -Action Block

As request in comment this is the output:

PS C:\WINDOWS\system32> Get-NetFirewallRule -DisplayName "Block Outbound Port 80"
Get-NetFirewallRule : No MSFT_NetFirewallRule objects found with property 'DisplayName' equal to 'Block Outbound Port 80'.  Verify the value of the property and retry.
At line:1 char:1
+ Get-NetFirewallRule -DisplayName "Block Outbound Port 80"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Block Outbound Port 80:String) [Get-NetFirewallRule], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_DisplayName,Get-NetFirewallRule
3
  • 1
    Try to replace "DisplayName" with the "Name" parameter. List your firewall rules and see if they aren't choke-full with your "temporary" rules.
    – harrymc
    Jul 21, 2021 at 19:57
  • 1
    Can you edit your question and include the output of Get-NetFirewallRule -All? Does the output of that command contain Block Outbound Port 80?
    – Ramhound
    Jul 21, 2021 at 19:58
  • 1
    Or: Get-NetFirewallRule -DisplayName "Block Outbound Port 80".
    – harrymc
    Jul 21, 2021 at 20:01

0

You must log in to answer this question.

Browse other questions tagged .