PowerShell Logo Small

Remove-NetIPsecMainModeRule



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

Deletes any main mode rules that match the specified criteria.

SYNTAX


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



Search powershellhelp.space

DESCRIPTION


The Remove-NetIPsecMainModeRule cmdlet permanently deletes one or more main mode rules from the specified policy store.


This cmdlet gets one or more main mode rules to be deleted with the Name parameter (default), the DisplayName parameter, rule properties, or by associated filters or
objects. The resulting queried rule is removed from the computer.


This cmdlet permanently removes a previously enabled main mode rule to be inactive within the computer or a group policy organizational unit. This cmdlet differs from the
Disable-NetIPsecMainModeRule cmdlet that disables a previously enabled main mode rule to be inactive within the computer or a group policy organizational unit. A disabled
main mode rule will not actively modify computer behavior, but it still exists on the computer or in a Group Policy Object (GPO) so it can be re-enabled.


After copying the firewall rules into a domain GPO, run this cmdlet, so the firewall rule does not conflict with the new domain GPO. When developing firewall policies, the
rules can be created on the local computer.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=288193
Disable-NetIPsecMainModeRule
Get-NetFirewallAddressFilter
Get-NetFirewallProfile
Get-NetIPsecMainModeCryptoSet
Get-NetIPsecPhase1AuthSet
Get-NetIPsecMainModeRule
New-NetIPsecMainModeRule
Open-NetGPO
Save-NetGPO
Set-NetIPsecMainModeRule
New-NetIPsecAuthProposal
New-GPO

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Remove-NetIPsecMainModeRule



This example removes all of the static local main mode rules. This cmdlet is useful for removing any policy that conflicts with the domain GPO.




EXAMPLE 2

PS C:\>Remove-NetIPsecMainModeRule -DisplayName "Main Mode Authenticate Computer"



This example deletes a set based on the localized name.




EXAMPLE 3

PS C:\>Remove-NetIPsecMainModeCryptoSet –ForceDiffieHellman $true



This example removes all of the main mode rules that require the Diffie-Hellman key exchange.




EXAMPLE 4

PS C:\>$ipsMMRule = Get-NetIPsecMainModeRule –DisplayName "Main Mode Authenticate Computer"



PS C:\>Remove-NetIPsecMainModeCryptoSet –InputObject $ipsMMRule



This example removes all of the main mode cryptographic sets that are associated with a main mode rule.