This is the built-in help made by Microsoft for the command 'Get-NetFirewallAddressFilter', 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.
Retrieves address filter objects from the target computer.
Get-NetFirewallAddressFilter [-All] [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Get-NetFirewallAddressFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] -AssociatedNetFirewallRule
<CimInstance> [<CommonParameters>]
Get-NetFirewallAddressFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] -AssociatedNetIPsecMainMode
Rule <CimInstance> [<CommonParameters>]
Get-NetFirewallAddressFilter [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] -AssociatedNetIPsecRule <Ci
mInstance> [<CommonParameters>]
The Get-NetFirewallAddressFilter cmdlet returns address filter objects associated with the input rules.
Address filter objects represent the local and remote addresses associated with the input rules. The LocalAddress and RemoteAddress parameters of a single rule are re
presented in a separate NetFirewallAddressFilter 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 retrieves the addresses associated with firewall, IPsec, and IPsec main-mode rules. This allows for rule querying based on address fields using the LocalA
ddress or RemoteAddress parameters; this cmdlet returns filter objects that may be further queried with the Where-Object cmdlet. The resultant filters are passed to t
he Get-NetFirewallRule, Get-NetIPsecRule, or Get-NetIPsecMainModeRule cmdlet to return the rules queried by address.
To modify rule address conditions, two methods can be used starting with the address filters returned by this cmdlet and optional additional querying.
-- The address filter objects can be piped into the Get-NetFirewallRule, Get-NetIPsecRule, or Get-NetIPsecMainModeRule cmdlet, which returns the rule objects associa
ted with the filters. These rules are then piped into the Set-NetFirewallRule, Set-NetIPsecRule, or Set-NetIPsecMainModeRule cmdlet where the address properties can b
e configured.
-- Alternatively, piping the address filter objects directly into the Set-NetFirewallAddressFilter cmdlet allows the LocalAddress and RemoteAddress parameters of the
rules to be specified.
<
Online Version: http://go.microsoft.com/fwlink/?LinkId=243167
Format-Table
Where-Object
Copy-NetIPsecRule
Get-NetFirewallRule
Get-NetIPsecMainModeRule
Get-NetIPsecRule
New-NetFirewallRule
New-NetIPsecMainModeRule
New-NetIPSecRule
Open-NetGPO
Save-NetGPO
Set-NetFirewallAddressFilter
Set-NetFirewallRule
Set-NetIPsecMainModeRule
Set-NetIPSecRule
New-GPO
<
EXAMPLE 1
PS C:\>Get-NetIPsecRule –PolicyStore ActiveStore
This cmdlet shows the same information in a dynamically-sized, formatted table.
PS C:\>Get-NetIPsecRule –PolicyStore ActiveStore | Format-Table
This example retrieves the addresses associated with all the rules in the active store. Note: Running this cmdlet without specifying the policy store retrieves the pe
rsistent store.
EXAMPLE 2
PS C:\>Get-NetFirewallRule –DisplayGroup "Core Networking" | Get-NetFirewallAddressFilter | Where-Object –FilterScript { $_.RemoteAddress –Eq "LocalSubnet6" }
This example gets the address configurations associated with a particular IPsec rule.
EXAMPLE 3
PS C:\>Get-NetFirewallRule –DisplayGroup "Core Networking" | Get-NetFirewallAddressFilter | Where-Object –FilterScript { $_.RemoteAddress –Eq "LocalSubnet6" } | Set-N
etFirewallAddressFilter –RemoteAddress LocalSubnet4
This is an alternate method with this cmdlet.
PS C:\>Get-NetFirewallRule –DisplayGroup "Core Networking" | Get-NetFirewallAddressFilter | Where-Object –FilterScript { $_.RemoteAddress –Eq "LocalSubnet6" } | Get-N
etFirewallRule | Set-NetFirewalllRule -RemoteAddress LocalSubnet4
This example gets the filter objects associated with the firewall rules with a particular remote, second, endpoint belonging to the Core Networking group and modifies
the second endpoint of those rules.