This is the built-in help made by Microsoft for the command 'Get-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.
Retrieves application filter objects from the target computer.
Get-NetFirewallApplicationFilter [-All] [-AsJob] [-CimSession <CimSession>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-NetFirewallApplicationFilter [-AsJob] [-CimSession <CimSession>] [-GPOSession <String>] [-Package <String>] [-PolicyStore <String>] [-Program <String>]
[-ThrottleLimit <Int32>] [<CommonParameters>]
Get-NetFirewallApplicationFilter [-AsJob] [-CimSession <CimSession>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] -AssociatedNetFirewallRule
The Get-NetFirewallApplicationFilter cmdlet returns application filter objects associated with the input rules.
Application filter objects represent the applications associated with firewall rules. The Program and Package parameters of a single rule are represented in a separate
NetFirewallApplicationFilter 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 programs associated with firewall rules. This allows for rule querying based on the application fields using the Program or Package parameters; this
cmdlet returns filter objects that may be further queried with the Where-Object cmdlet. The resultant filters are passed into the Get-NetFirewallRule cmdlet to return the
rules queried by address.
To modify the application conditions, two methods can be used starting with the application filters returned by this cmdlet and optional additional querying.
The application filter objects can be piped into the Get-NetFirewallRule cmdlet, which returns the rule objects associated with the filters. These rules are then piped into
the Set-NetFirewallRule cmdlet where the application properties can be configured.
Alternatively, piping the address filter objects directly into the Set-NetFirewallAddressFilter cmdlet allows the Program and Package parameters of the rules to be specified.
Online Version: http://go.microsoft.com/fwlink/?LinkId=268418
This example gets all of the firewall rules configured to a specified program.
PS C:\>Get-NetFirewallApplicationFilter -PolicyStore ActiveStore
This cmdlet shows the same information in a dynamically-sized, formatted table.
PS C:\>Get-NetFirewallApplicationFilter -PolicyStore ActiveStore | Format-Table
This example retrieves the applications associated with all of the rules in the active store.
PS C:\>Get-NetFirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallApplicationFilter
This example gets the application configurations associated with a particular firewall rule.
PS C:\>Get-NetFirewallRule –DisplayName "Contoso Messenger" | Get-NetFirewallApplicationFilter | Set-NetFirewallApplicationFilter –Program %SystemRoot%\System32\messenger.exe
An alternate method for performing the same action.
PS C:\>Set-NetFirewallRule –DisplayName "Contoso Messenger" –Program %SystemRoot%\System32\messenger.exe
This example changes the application path associated with a particular firewall rule.
PS C:\>$NewPackageSDDL = "S-1-15-2-4292807980-2381230043-3108820062-1451069988-2614848061-670482394-695399705"
PS C:\>Get-NetFirewallRule –Group Socialite | Get-NetFirewallApplicationFilter | Set-NetFirewallAddressFilter –Package $NewPackageSDDL
This example modifies the package associated with all of the related firewall rules for the Windows Store applications.