PowerShell Logo Small

Get-NetFirewallServiceFilter



This is the built-in help made by Microsoft for the command 'Get-NetFirewallServiceFilter', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' 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 service filter objects from the target computer.

SYNTAX


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>] [<Com
monParameters>]
Get-NetFirewallServiceFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] -AssociatedNetFirewallRule
<CimInstance> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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 NetFirewall
ServiceFilter object. The filter-to-rule relationship is always one-to-one and is managed automatically. Rule parameters associated with filters can only be queried u
sing 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 pass
ed 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 t
hen 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.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=285413
Format-Table
Where-Object
Get-NetFirewallRule
Get-NetIPSecRule
New-NetFirewallRule
New-NetIPSecRule
Set-NetFirewallRule
Set-NetFirewallServiceFilter
Set-NetIPSecRule
New-GPO

REMARKS

<

Examples


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 r
etrieves 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.