PowerShell Logo Small

Update-NetIPsecRule



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

Updates an IPsec rule by adding or removing a set of IP addresses.

SYNTAX


Update-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-GPOSession <String>] [-IPv4Addresses <String[]>] [-IPv6Addresses <String[]>] [-PassThru] [-PolicyStore <St
ring>] [-ThrottleLimit <Int32>] -Action <ChangeAction> -EndpointType <EndpointType> -IPsecRuleName <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Update-NetIPsecRule [-AsJob] [-CimSession <CimSession[]>] [-IPv4Addresses <String[]>] [-IPv6Addresses <String[]>] [-PassThru] [-ThrottleLimit <Int32>] -Action <Change
Action> -EndpointType <EndpointType> -InputObject <CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Update-NetIPsecRule cmdlet adds or deletes IP addresses for an IPsec rule.


This cmdlet can get an IPsec rule to be updated using parameter values including IPsecRuleName (default), DisplayName, rule properties, or by associated NetFirewall f
ilters or NetIPsec objects. The resultant queried IP addresses of the rule are updated with an Add or Delete as specified by the Action parameter.


If the Get-DAPolicyChange cmdlet is run, then the Windows PowerShell® script (.ps1) that is generated contains instances of this cmdlet. If the Windows PowerShell scr
ipt (.ps1) is run, then the IPsec rules are updated in the appropriate policy stores. See the Get-DAPolicyChange cmdlet for more information.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=288379
Get-NetFirewallAddressFilter
Get-NetFirewallInterfaceFilter
Get-NetFirewallInterfaceTypeFilter
Get-NetFirewallPortFilter
Get-NetFirewallProfile
Get-NetIPsecPhase1AuthSet
Get-NetIPsecPhase2AuthSet
Get-NetIPsecQuickModeCryptoSet
New-NetIPsecQuickModeCryptoSet
New-NetIPsecRule
Open-NetGPO
Save-NetGPO
Set-NetIPsecRule
Get-DAPolicyChange
New-GPO

REMARKS

<

Examples


EXAMPLE 1

PS C:\>$IPv4list = 2.1.1.1,2.1.1.2



PS C:\>$IPv6list = fefe:fefe::1,fefe:fefe::2



PS C:\>Update-NetIPsecRule –IPsecRuleName "IPsec Rule" –Action Add -IPv4addresses $IPv4list –IPv6addresses $IPv6list –EndpointType Endpoint2 –PolicyStore domain.conto
so.com/sample_gpo



This example adds a list of IP addresses to an IPsec rule in a specific GPO.