This is the built-in help made by Microsoft for the command 'Set-NetFirewallInterfaceFilter', in PowerShell version 4 - as retrieved from
Windows version 'Microsoft Windows 8.1 Enterprise' 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.
Modifies interface filter objects, thereby modifying the InterfaceAlias parameter values of the firewall or IPsec rules.
Set-NetFirewallInterfaceFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-InterfaceAlias <String[]>] [-PassThru] [-PolicyStore <String>] [-Throttl
eLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-NetFirewallInterfaceFilter [-AsJob] [-CimSession <CimSession[]>] [-InterfaceAlias <String[]>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-
Confirm] [-WhatIf] [<CommonParameters>]
The Set-NetFirewallInterfaceFilter cmdlet modifies the interfaces associated with the input firewall rules.
See the Get-NetFirewallInterfaceFilter cmdlet for more information about the interface filters.
To modify the interface conditions, two methods can be used starting with the Get-NetFirewallInterfaceFilter cmdlet that returns the interface filter objects and opti
onal additional querying.
-- The network firewall interface filter objects are piped into the Get-NetFirewallRule or Get-NetIPsecRule cmdlet. The Get-NetFirewallRule or Get-NetIPsecRule cmdle
t returns the rules objects associated with the filters rules and pipes the rules objects into the Set-NetFirewallRule or Set-NetIPsecrule cmdlet, which configures th
e interface properties.
-- Alternatively, the network firewall interface filter objects are piped directly to this cmdlet, which modifies the Program and Package parameter values of the rul
es.
<
Online Version: http://go.microsoft.com/fwlink/?LinkId=288212
Where-Object
Copy-NetIPsecRule
Get-NetFirewallApplicationFilter
Get-NetFirewallInterfaceFilter
Get-NetFirewallRule
Get-NetIPSecRule
New-NetFirewallRule
New-NetIPSecRule
Open-NetGPO
Save-NetGPO
Set-NetFirewallRule
Set-NetIPSecRule
New-GPO
<
EXAMPLE 1
PS C:\>$nfwInterfaceFilter = ( Get-FirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallInterfaceFilter )
PS C:\>Set-NetFirewallInterfaceFilter –InterfaceAlias Any –InputObject $nfwInterfaceFilter
This cmdlet can be run using only the pipeline.
PS C:\>Get-FirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallInterfaceFilter | Set-NetFirewallInterfaceFilter –InterfaceAlias Any
This cmdlet can be run without using the pipeline.
PS C:\>Set-NetFirewallRule –DisplayName "Contoso Messenger" –InterfaceAlias Any
This example modifies the InterfaceAlias parameter value of a particular firewall rule.
EXAMPLE 2
PS C:\>$nfwInterfaceFilter = ( Get-NetIPsecRule –Group "Wired Rules" | Get-NetFirewallInterfaceFilter )
PS C:\>$nfwInterfaceFilterWired2 = ( Where-Object -Property { $_.InterfaceAlias –Eq "Wired2" } –InputObject $nfwInterfaceFilter )
PS C:\>Set-NetFirewallInterfaceFilter –InterfaceAlias Wired3 –InputObject $nfwInterfaceFilterWired2
This cmdlet can be run using only the pipeline.
PS C:\>Get-NetIPsecRule –Group "Wired Rules" | Get-NetFirewallInterfaceFilter | Where-Object -Property { $_.InterfaceAlias –Eq "Wired2" } | Set-NetFirewallInterfaceFi
lter –InterfaceAlias Wired3
This example modifies a particular interface alias associated with all of the firewall rules in a specified group.