PowerShell Logo Small

Disable-NetFirewallRule



This is the built-in help made by Microsoft for the command 'Disable-NetFirewallRule', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Disables a firewall rule.

SYNTAX


Disable-NetFirewallRule [-Action <Action[]>] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-Description <String[]>] [-Direction
<Direction[]>] [-DisplayGroup <String[]>] [-EdgeTraversalPolicy <EdgeTraversal[]>] [-Enabled <Enabled[]>] [-GPOSession <String>] [-Group
<String[]>] [-LocalOnlyMapping <Boolean[]>] [-LooseSourceMapping <Boolean[]>] [-Owner <String[]>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-PolicyStoreSource <String[]>] [-PolicyStoreSourceType <PolicyStoreType[]>] [-PrimaryStatus <PrimaryStatus[]>]
[-Status <String[]>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-All [<SwitchParameter>]] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru
[<SwitchParameter>]] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] [-Confirm [<SwitchParameter>]]
[-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallInterfaceFilter <CimInstance>
[-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallSecurityFilter <CimInstance>
[-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -DisplayName <String[]> [-Confirm
[<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-Name] <String[]> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru
[<SwitchParameter>]] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] [-Confirm [<SwitchParameter>]]
[-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallProfile <CimInstance> [-Confirm
[<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallServiceFilter <CimInstance>
[-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-PassThru [<SwitchParameter>]] [-ThrottleLimit <Int32>]
-InputObject <CimInstance[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallInterfaceTypeFilter
<CimInstance> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallPortFilter <CimInstance>
[-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallApplicationFilter <CimInstance>
[-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Disable-NetFirewallRule [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PassThru [<SwitchParameter>]]
[-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore [<SwitchParameter>]] -AssociatedNetFirewallAddressFilter <CimInstance>
[-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Disable-NetFirewallRule cmdlet disables a previously enabled firewall rule to be inactive within the computer or a group policy
organizational unit. A Disabled rule will not actively modify system behavior, but the rule still exists on the computer or in a Group Policy
Object (GPO) so it can be re-enabled. This is different from the Remove-NetFirewallRule cmdlet, which permanently removes the rule.


This cmdlet gets one or more firewall rules to be disabled with the Name parameter (default), the DisplayName parameter, rule properties, or
by the associated filters or objects. The Enabled parameter value for the resulting queried rules is set to False.


Disabling IPsec and firewall rules can be useful for debugging firewall policy mismatch issues, but is easier when the rules are in the local,
or persistent, store. Disabling rules in a GPO container will not take effect until the next time the client applies the GPO. To troubleshoot
GPO-based firewall policy, consider copying all the rules and authorization and cryptographic sets from the GPO to a computer that does not
have the GPO policy applied using the Copy-NetFirewallRule cmdlet. This is way to locally modify the policy, in order to troubleshoot any
IPsec problems.



<

RELATED LINKS

Copy-NetFirewallRule
Enable-NetFirewallRule
Get-NetFirewallAddressFilter
Get-NetFirewallApplicationFilter
Get-NetFirewallInterfaceFilter
Get-NetFirewallInterfaceTypeFilter
Get-NetFirewallPortFilter
Get-NetFirewallProfile
Get-NetFirewallSecurityFilter
Get-NetFirewallServiceFilter
Get-NetFirewallRule
New-NetFirewallRule
Open-NetGPO
Remove-NetFirewallRule
Rename-NetFirewallRule
Save-NetGPO
Set-NetFirewallRule
Show-NetFirewallRule
New-GPO

REMARKS

<

Examples


EXAMPLE 1

PS C:\> Disable-NetFirewallRule –DisplayName "Network Discovery"



This example disables a firewall rule given the localized name.




EXAMPLE 2

PS C:\> Disable-NetFirewallRule –Group "@FirewallAPI.dll,-28502"



This example disables all of the File and Printer Sharing rules on the local computer. Use the universal and world-ready indirect string
@FirewallAPI to specify the group.




EXAMPLE 3

PS C:\> Disable-NetFirewallRule –Direction Outbound -PolicyStore contoso.com\gpo_name



This example disables all of the previously enabled outbound firewall rules in a specified GPO.




EXAMPLE 4

PS C:\> $nfwRule = Get-NetFirewallRule -PolicyStore ActiveStore -PolicyStoreSourceType Dynamic


PS C:\> Disable-NetFirewallRule –InputObject $nfwRule

This is an alternate way to perform the same using only the pipeline.
PS C:\> Get-NetFirewallRule -PolicyStore ActiveStore -PolicyStoreSourceType Dynamic | Disable-NetFirewallRule



This example disables the dynamic firewall rules on the computer.