PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'Get-NetFirewallServiceFilter', 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 service filter objects from the target computer.


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

Search powershellhelp.space


The Get-NetFirewallServiceFilter cmdlet returns the service filter objects associated with the piped input firewall rules.

Service filter objects represent the Windows services associated with firewalls rules. The Service parameter of a single rule is represented in a separate
NetFirewallServiceFilter 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 service settings associated with firewall rules. This allows for rule querying based on the Service parameter. The resultant filters are passed into
the Get-NetFirewallRule cmdlet to return the rules queried by service.

To modify the service conditions, two methods can be used starting with the service filters returned by this cmdlet.

The array of NetFirewallServiceFilter objects can be piped into the Get-NetFirewallRule cmdlet, which returns the rules associated with the filters. These rules are then
piped into the Set-NetFirewallRule cmdlet where the service properties can be configured.

Alternatively, piping the array of NetFirewallServiceFilter objects directly to this cmdlet allows the Service parameter of the rules to be modified.



Online Version: http://go.microsoft.com/fwlink/?LinkId=285413




Example 1

PS C:\>Get-NetFirewallServiceFilter -PolicyStore ActiveStore

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

This example retrieves the service conditions associated with all of the firewall rules in the active store. Running this cmdlet without specifying the policy store
retrieves the persistent store.

Example 2

PS C:\>Get-NetFirewallRule –DisplayName "Wireless Portable Devices" | Get-NetFirewallServiceFilter

This example gets the service associated with a firewall rule specified by using the localized name.

Example 3

PS C:\>Get-NetFirewallServiceFilter –Service dnscache | Get-NetFirewallRule | Where-Object –Property { $_.Enabled –Eq "False" }

This example gets the disabled firewall rules associated with the dnscache service from the persistent store.