PowerShell Logo Small

Get-NetIPsecMainModeRule



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

SYNOPSIS

Gets the IPsec main mode rules from the target computer.

SYNTAX


Get-NetIPsecMainModeRule [-All] [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore]
[<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -DisplayName
<String[]> [<CommonParameters>]
Get-NetIPsecMainModeRule [-Name] <String[]> [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore]
[<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-Description <String[]>] [-DisplayGroup <String[]>] [-Enabled <Enabled[]>] [-GPOSession <String>] [-Group
<String[]>] [-MainModeCryptoSet <String[]>] [-Phase1AuthSet <String[]>] [-PolicyStore <String>] [-PolicyStoreSource <String[]>] [-PolicyStoreSourceType <PolicyStoreType[]>]
[-PrimaryStatus <PrimaryStatus[]>] [-Status <String[]>] [-ThrottleLimit <Int32>] [-TracePolicyStore] [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore]
-AssociatedNetIPsecPhase1AuthSet <CimInstance> [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore]
-AssociatedNetIPsecMainModeCryptoSet <CimInstance> [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore]
-AssociatedNetFirewallProfile <CimInstance> [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore]
-AssociatedNetFirewallAddressFilter <CimInstance> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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


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


When a cmdlet with the get noun for any firewall, IPsec, or main mode rule is run, notice that common conditions like addresses or ports do not appear. These conditions 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 these fields
(ports, addresses, security, interfaces, or services) is requested, then the filter objects will need to be retrieved with the corresponding cmdlet with the Get verb. 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=285780
Get-NetFirewallAddressFilter
Get-NetFirewallApplicationFilter
Get-NetFirewallInterfaceFilter
Get-NetFirewallInterfaceTypeFilter
Get-NetFirewallPortFilter
Get-NetFirewallProfile
Get-NetFirewallRule
Get-NetFirewallSecurityFilter
Get-NetFirewallServiceFilter
Get-NetIPsecMainModeCryptoSet
Get-NetIPsecPhase1AuthSet
New-NetIPsecMainModeRule
Open-NetGPO
Save-NetGPO
Set-NetIPsecMainModeRule
New-NetIPsecAuthProposal
New-GPO

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Get-NetIPsecMainModeRule –PolicyStore ActiveStore



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




EXAMPLE 2

PS C:\>Get-NetIPsecMainModeRule -DisplayName "First Authentication MM Rule"



This example gets a main mode rule and displays the parameters using the localized rule name of the rule.




EXAMPLE 3

PS C:\>Get-NetIPsecPhase1AuthSet –DisplayName "P1 Auth Set" | Get-NetIPsecMainModeRule



This example gets all of the IPsec rules associated with the specified phase 1 authentication set.