PowerShell Logo Small

Set-NetFirewallInterfaceTypeFilter



This is the built-in help made by Microsoft for the command 'Set-NetFirewallInterfaceTypeFilter', 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

Modifies interface type filter objects, thereby modifying the interface type conditions of the firewall or IPsec rules.

SYNTAX


Set-NetFirewallInterfaceTypeFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-InterfaceType <InterfaceType>] [-PassThru] [-PolicyStore <String>]
[-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-NetFirewallInterfaceTypeFilter [-AsJob] [-CimSession <CimSession[]>] [-InterfaceType <InterfaceType>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]>
[-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-NetFirewallInterfaceTypeFilter cmdlet modifies the interface types associated with the input firewall or IPsec rules.


See theGet-NetFirewallInterfaceTypeFilter cmdlet for more information about the interface type filters.


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

-- The network firewall interface type filter objects are piped into the Get-NetFirewallRule or Get-NetIPsecrule cmdlet. The Get-NetFirewallRule or Get-NetIPsecrule cmdlet
returns the rules associated with the filters and pipes the rules into the Set-NetFirewallRule or Set-NetIPsecrule cmdlet, which configures the interface properties.

-- Alternatively, the network firewall interface type filter objects are piped directly to this cmdlet, which modifies the InterfaceType parameter value of the rules.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=288213
Where-Object
Copy-NetIPsecRule
Get-NetFirewallInterfaceTypeFilter
Get-NetFirewallRule
Get-NetIPSecRule
New-NetFirewallRule
New-NetIPSecRule
Open-NetGPO
Save-NetGPO
Set-NetFirewallRule
Set-NetIPSecRule
New-GPO

REMARKS

<

Examples


EXAMPLE 1

PS C:\>$nfwInterfaceTypeFilter = ( Get-FirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallInterfaceTypeFilter )



PS C:\>Set-NetFirewallInterfaceTypeFilter –InterfaceType Any –InputObject $nfwInterfaceTypeFilter


This cmdlet can be run using only the pipeline.
PS C:\>Get-FirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallInterfaceTypeFilter | Set-NetFirewallInterfaceTypeFilter –InterfaceType Any


This cmdlet can be run without the pipeline.
PS C:\>Set-NetFirewallRule –DisplayName "Contoso Messenger" –InterfaceType Any



This example modifies the InterfaceType parameter value for a particular firewall rule.




EXAMPLE 2

PS C:\>$nfwInterfaceTypeFilter = ( Get-NetFirewallInterfaceTypeFilter –InterfaceType Wired )



PS C:\>Set-NetFirewallInterfaceTypeFilter –InterfaceType Any –InputObject $nfwInterfaceTypeFilter


This cmdlet can be run using only the pipeline.
PS C:\>Get-NetFirewallInterfaceTypeFilter –InterfaceType Wired | Set-NetFirewallInterfaceTypeFilter –InterfaceType Any



This example modifies the interface type for all of the rules previously associated with the Wired interface type.




EXAMPLE 3

PS C:\>$nfwInterfaceTypeFilter = ( Get-NetIPsecRule –Group DirectAccess | Get-NetFirewallInterfaceTypeFilter )



PS C:\>$nfwInterfaceTypeFilterWired = Where-Object -Property { $_.InterfaceType –Eq "Wired" } –InputObject $nfwInterfaceTypeFilter



PS C:\>Set-NetFirewallInterfaceTypeFilter –InterfaceType RemoteAccess –InputObject $nfwInterfaceTypeFilterWired


This cmdlet can be run using only the pipeline.
PS C:\>Get-NetIPsecRule –Group DirectAccess | Get-NetFirewallInterfaceTypeFilter | Where-Object –Property { $_.InterfaceType –Eq "Wired" } |
Set-NetFirewallInterfaceTypeFilter –InterfaceType RemoteAccess



This example modifies the interface type associated with all of the IPsec rules in a specified group.