PowerShell Logo Small

Get-NetFirewallInterfaceFilter



This is the built-in help made by Microsoft for the command 'Get-NetFirewallInterfaceFilter', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 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

Retrieves interface filter objects from the target computer.

SYNTAX


Get-NetFirewallInterfaceFilter [-All] [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-NetFirewallInterfaceFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] -AssociatedNetIPsecRule
<CimInstance> [<CommonParameters>]
Get-NetFirewallInterfaceFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] -AssociatedNetFirewallRule
<CimInstance> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-NetFirewallInterfaceFilter cmdlet returns interface filter objects associated with the input rules.


Interface filter objects represent the interfaces associated with firewall and IPsec rules. The InterfaceAlias parameter of a single rule is represented in a separate
NetFirewallInterfaceFilter object. The filter to rule relationship is always one-to-one and is managed automatically. Rule parameters associated with filters can only be
queried using filter objects.


This cmdlet displays the interface aliases associated with firewall and IPsec rules. This allows for rule querying based on the InterfaceAlias parameter; this cmdlet returns
filter objects that may be further queried with the Where-Object cmdlet. The resultant filters are passed to Get-NetFirewallRule or Get-NetIPsecRule cmdlet to return the
rules queried by interface.


To modify the interface conditions, two methods can be used starting with the interface filters returned by this cmdlet and optional additional querying.


The array of NetFirewallInterfaceFilter objects can be piped to Get-NetFirewallRule or Get-NetIPsecrule cmdlet, which returns the rules associated with the filters. These
rules are then piped to Set-NetFirewallRule or Set-NetIPsecrule cmdlet where the interface properties can be configured.


Alternatively, piping the array of NetFirewallInterfaceFilter objects directly to the Set-NetFirewallInterfaceFilter cmdlet allows the Program and Package parameters of the
rules to be modified.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=275503
Format-Table
Where-Object
Copy-NetIPsecRule
Get-NetFirewallApplicationFilter
Get-NetFirewallRule
Get-NetIPsecRule
New-NetFirewallRule
New-NetIPsecMainModeRule
New-NetIPSecRule
Open-NetGPO
Save-NetGPO
Set-NetFirewallInterfaceFilter
Set-NetFirewallRule
Set-NetIPSecRule
New-GPO

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Get-NetFirewallRule -PolicyStore ActiveStore


This cmdlet shows the same information in a dynamically-sized, formatted table.
PS C:\>Get-NetFirewallRule -PolicyStore ActiveStore | Format-Table



This example retrieves the interface aliases associated with all of the rules in the active store.




EXAMPLE 2

PS C:\>Get-NetFirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallInterfaceFilter



This example gets the interface aliases associated with a particular firewall rule.




EXAMPLE 3

PS C:\>Get-NetFirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallInterfaceFilter | Set-NetFirewallInterfaceFilter –InterfaceAlias Any


This cmdlet shows the same information in a dynamically-sized, formatted table.
PS C:\>Set-NetFirewallRule –DisplayName "Contoso Messenger" –InterfaceAlias Any



This example modifies the interface alias field of a particular firewall rule.




EXAMPLE 4

PS C:\>Get-NetIPsecRule –Group "Wired Rules" | Get-NetFirewallInterfaceFilter | Where-Object -FilterScript { $_.InterfaceAlias –Eq "Wired2" } |
Set-NetFirewallInterfaceFilter –InterfaceAlias Wired3



This example modifies a particular interface alias associated with all of the firewall rules in a specified group.