This is the built-in help made by Microsoft for the command 'Get-NetIPsecMainModeRule', 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.
Gets the IPsec main mode rules from the target computer.
Get-NetIPsecMainModeRule [-All] [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] [<Co
mmonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -DisplayNam
e <String[]> [<CommonParameters>]
Get-NetIPsecMainModeRule [-Name] <String[]> [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolic
yStore] [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-Description <String[]>] [-DisplayGroup <String[]>] [-Enabled <Enabled[]>] [-GPOSession <String>] [-Gr
oup <String[]>] [-MainModeCryptoSet <String[]>] [-Phase1AuthSet <String[]>] [-PolicyStore <String>] [-PolicyStoreSource <String[]>] [-PolicyStoreSourceType <PolicySto
reType[]>] [-PrimaryStatus <PrimaryStatus[]>] [-Status <String[]>] [-ThrottleLimit <Int32>] [-TracePolicyStore] [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -Associated
NetIPsecPhase1AuthSet <CimInstance> [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -Associated
NetIPsecMainModeCryptoSet <CimInstance> [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -Associated
NetFirewallProfile <CimInstance> [<CommonParameters>]
Get-NetIPsecMainModeRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-PolicyStore <String>] [-ThrottleLimit <Int32>] [-TracePolicyStore] -Associated
NetFirewallAddressFilter <CimInstance> [<CommonParameters>]
The Get-NetIPsecMainModeRule cmdlet returns the instances of main mode rules that match the search parameters from the user. See the New-NetIPsecMainModeRule cmdlet f
or 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 q
ueried 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 conditio
ns 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 o
n these fields (ports, addresses, security, interfaces, or services) is requested, then the filter objects will need to be retrieved with the corresponding cmdlet wit
h the Get verb. See the Get-NetFirewallAddressFilter, Get-NetFirewallApplicationFilter, Get-NetFirewallInterfaceFilter, Get-NetFirewallInterfaceTypeFilter, Get-NetFir
ewallPortFilter, Get-NetFirewallProfile, Get-NetFirewallSecurityFilter, Get-NetFirewallServiceFilter, or Get-NetFirewallRule cmdlet for more information.
<
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
<
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.