This is the built-in help made by Microsoft for the command 'Set-NetFirewallApplicationFilter', 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.
Modifies application filter objects, thereby modifying the program and package conditions of the firewall rules.
Set-NetFirewallApplicationFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-Package <String>] [-PassThru] [-PolicyStore <String>] [-Program <String>]
[-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-NetFirewallApplicationFilter [-AsJob] [-CimSession <CimSession[]>] [-Package <String>] [-PassThru] [-Program <String>] [-ThrottleLimit <Int32>] -InputObject
<CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]
The Set-NetFirewallApplicationFilter cmdlet modifies the applications associated with the input firewall rules.
See the Get-NetFirewallApplicationFilter cmdlet for more information on application filters.
To modify the application conditions, two methods can be used starting with the application filters returned by the Get-NetFirewallApplicationFilter cmdlet and optional
additional querying.
-- The application filter objects can be piped to the Get-NetFirewallRule cmdlet, which returns the rule objects associated with the filters. These rules are then piped to
the Set-NetFirewallRule cmdlet where the application properties can be configured.
-- Alternatively, piping the address filter objects directly to this cmdlet allows the Program and Package parameters of the rules to be specified.
<
Online Version: http://go.microsoft.com/fwlink/?LinkId=288211
Get-NetFirewallApplicationFilter
Get-NetFirewallRule
Get-NetIPSecRule
New-NetFirewallRule
New-NetIPSecRule
Open-NetGPO
Save-NetGPO
Set-NetFirewallRule
Set-NetIPSecRule
New-GPO
<
EXAMPLE 1
PS C:\>$nfwApplicationFilter = ( Get-FirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallApplicationFilter )
PS C:\>Set-NetFirewallApplicationFilter –InputObject $nfwApplicationFilter –Program %SystemRoot%\System32\messenger.exe
This cmdlet can be run using only the pipeline.
PS C:\>Get-FirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallApplicationFilter | Set-NetFirewallApplicationFilter –Program %SystemRoot%\System32\messenger.exe
This cmdlet can be run without using the pipeline.
PS C:\>Set-NetFirewallRule –DisplayName "Contoso Messenger" –Program %SystemRoot%\System32\messenger.exe
This example changes the application path associated with a particular firewall rule.
EXAMPLE 2
PS C:\>$NewPackageSDDL = "S-1-15-2-4292807980-2381230043-3108820062-1451069988-2614848061-670482394-695399705"
PS C:\>$nfwApplicationFilter = (Get-NetFirewallRule –Group Socialite | Get-NetFirewallApplicationFilter )
PS C:\>Set-NetFirewallAddressFilter – InputObject $nfwApplicationFilter –Package $NewPackageSDDL
This cmdlet can be run using only the pipeline.
PS C:\>Get-NetFirewallRule –Group Socialite | Get-NetFirewallApplicationFilter | Set-NetFirewallAddressFilter –Package $NewPackageSDDL
This example modifies the package associated with all related firewall rules for the Socialite Windows Store application.