PowerShell Logo Small

Get-NetIPsecRule



This is the built-in help made by Microsoft for the command 'Get-NetIPsecRule', 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

Gets an IPsec rule from the target computer.

SYNTAX


Get-NetIPsecRule [-All] [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] [<CommonPara
meters>]
Get-NetIPsecRule [-AllowSetKey <Boolean[]>] [-AllowWatchKey <Boolean[]>] [-AsJob] [-CimSession <CimSession[]>] [-Description <String[]>] [-DisplayGroup <String[]>] [-
Enabled <Enabled[]>] [-EncryptedTunnelBypass <Boolean[]>] [-ForwardPathLifetime <UInt32[]>] [-GPOSession <String>] [-Group <String[]>] [-InboundSecurity <SecurityPoli
cy[]>] [-KeyModule <KeyModule[]>] [-Machine <String[]>] [-Mode <IPsecMode[]>] [-OutboundSecurity <SecurityPolicy[]>] [-Phase1AuthSet <String[]>] [-Phase2AuthSet <Stri
ng[]>] [-PolicyStore <String>] [-PolicyStoreSource <String[]>] [-PolicyStoreSourceType <PolicyStoreType[]>] [-PrimaryStatus <PrimaryStatus[]>] [-QuickModeCryptoSet <S
tring[]>] [-RemoteTunnelHostname <String[]>] [-RequireAuthorization <Boolean[]>] [-Status <String[]>] [-ThrottleLimit <Int32>] [-TracePolicyStore] [-User <String[]>]
[<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetIPsec
Phase1AuthSet <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetIPsec
QuickModeCryptoSet <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetIPsec
Phase2AuthSet <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-IPsecRuleName] <String[]> [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePoli
cyStore] [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetFirew
allProfile <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetFirew
allPortFilter <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetFirew
allInterfaceTypeFilter <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetFirew
allInterfaceFilter <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -AssociatedNetFirew
allAddressFilter <CimInstance> [<CommonParameters>]
Get-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -DisplayName <Strin
g[]> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-NetIPsecRule cmdlet returns the instances of IPsec rules that match the search parameters from the user. See the New-NetIPsecRule cmdlet for more information.


This cmdlet returns IPsec rules by specifying the IPsecRuleName parameter (default), the DisplayName parameter, rule properties, or by associated filters or objects.
The queried rules can be placed into variables and piped to other cmdlets for further modifications or monitoring.


When running the cmdlet with the get noun for any firewall, IPsec, or main mode rule, notice that the common conditions like addresses or ports do not appear. These c
onditions are represented in separate objects called filters. The filter-to-rule relationship is always one-to-one and is managed automatically. If a query for rules
based on the parameters (ports, addresses, security, interfaces, and services) is performed, then the filter objects with the corresponding cmdlet with the Get verb s
hould to be retrieved. See the Get-NetFirewallAddressFilter, Get-NetFirewallApplicationFilter, Get-NetFirewallInterfaceFilter, Get-NetFirewallInterfaceTypeFilter, Get
-NetFirewallPortFilter, Get-NetFirewallProfile, Get-NetFirewallSecurityFilter, Get-NetFirewallServiceFilter, or Get-NetFirewallRule cmdlet for more information.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=287711
Where-Object
Get-NetFirewallAddressFilter
Get-NetFirewallApplicationFilter
Get-NetFirewallInterfaceFilter
Get-NetFirewallInterfaceTypeFilter
Get-NetFirewallPortFilter
Get-NetFirewallProfile
Get-NetFirewallRule
Get-NetFirewallSecurityFilter
Get-NetFirewallServiceFilter
Get-NetIPsecPhase1AuthSet
Get-NetIPsecPhase1AuthSet
Get-NetIPsecQuickModeCryptoSet
Get-NetIPsecRule
New-NetIPsecQuickModeCryptoSet
New-NetIPsecRule
Open-NetGPO
Save-NetGPO
Set-NetIPsecRule

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Get-NetIPsecRule –PolicyStore ActiveStore



This example gets all IPsec rules currently in the active store. Running this cmdlet without specifying the policy store retrieves the persistent store.




EXAMPLE 2

PS C:\>Get-NetIPsecRule -DisplayName "SecureNet: Exempt SAP Server"



This example gets an IPsec rule and displays the parameters given based upon the localized rule name.




EXAMPLE 3

PS C:\>Get-NetIPsecRule –DisplayGroup "DirectAccess-Traffic"



This example gets all the IPsec rules associated to a specified group.




EXAMPLE 4

PS C:\>Get-NetFirewallInterfaceTypeFilter | Where-Object –Property { $_.InterfaceType -Eq "Wireless" } | Get-NetIPsecRule



This example gets all IPsec rules associated with wireless interface.