Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-VpnIPAddressAssignment

Set-VpnIPAddressAssignment

ps_vpnipaddressassignment_v1.0.0.cdxml

Synopsis

Configures the IPv4 address assignment method or the IPv6 prefix for IPv6 address assignment.

Syntax

Set-VpnIPAddressAssignment [-AsJob] [-CimSession] [-ComputerName] [-IPAddressRange] [-IPAssignmentMethod] [-IPv6Prefix] [-PassThru] [-ThrottleLimit] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-VpnIPAddressAssignment [-AsJob] [-CimSession] [-ComputerName] [-PassThru] [-ThrottleLimit] [-EntrypointName] [-IPv6Prefix] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Set-VpnIPAddressAssignment cmdlet is only used to toggle from one IPv4 address assignment type to another. This cmdlet cannot be used to add additional IPv4 address ranges if a static pool IP address assignment is being used. -- This cmdlet cannot be used to Enable or Disable an IPv4 or IPv6 address assignment.

Parameters

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-CimSession <CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ComputerName <String>

Specifies the IPv4 or IPv6 address, or host name, of the computer on which the VPN server computer specific tasks should be run. If this parameter is specified, then the address assignment properties are configured for that VPN server.

Aliases

Cn

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-EntrypointName <String>

Specifies a site in a multi-site deployment for which the IPv6 prefix needs to be configured. This parameter is not applicable to the IPv4 address assignment properties as these properties are always configured at the individual server level and not site level. If this parameter is not specified in a multi-site deployment, then this parameter value to which the cmdlet is run is used. The server could also be represented by using the ComputerName parameter. If this parameter and the ComputerName parameter are specified and the ComputerName does not belong to the site represented by this parameter, then this parameter takes precedence and the authentication type is configured for it.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-IPAddressRange <String[]>

Specifies the IP address range from which IP addresses are allocated to VPN clients. Consists of a starting IP and an ending IP. This parameter can be configured only if the IPAssignmentMethod parameter is specified to be StaticPool. If there are no pre-existing IPv4 address pools, then it is mandatory to specify an address range.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-IPAssignmentMethod <String>

Specifies the mechanism for IPv4 address assignment. The acceptable values for this parameter are:  -- Dhcp. -- StaticPool. When load balancing is active the IPv4 address assignment method cannot be configured to DHCP. Only a static pool is supported.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-IPv6Prefix <String>

Specifies the IPv6 prefix used for IPv6 address assignment.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ThrottleLimit <Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

None

Return Type

Microsoft.Management.Infrastructure.CimInstance#VpnIPAddressAssignment

Notes

None

Examples

EXAMPLE 1

This cmdlet sets the IPv4 address assignment type to be DHCP which causes IPv4 address assignment to happen from a DHCP server.

PS C:\>Set-VpnIPAddressAssignment -IPAssignmentMethod "Dhcp" -PassThru
IPAssignmentMethod : Dhcp 
IPAddressRangeList : 
IPv6Prefix         : 

EXAMPLE 2

The cmdlet specifies the IPv4 address assignment to happen from the IP range 30.1.1.10 through 30.1.1.30. IPv6 prefix 2002:836b:2:1000::/64 is used for IPv6 address assignment. Changing the IPv6 prefix requires the remote access service to be restarted in order to take effect. This is conveyed through the warning message.

PS C:\>Set-VpnIPAddressAssignment -IPAssignmentMethod "StaticPool" -IPAddressRange "30.1.1.10", "30.1.1.30" -IPv6Prefix "2002:836b:2:1000::/64" -PassThru
WARNING: The remoteaccess service must be restarted for the changes to take effect. 
 
IPAssignmentMethod : StaticPool 
IPAddressRangeList : {30.1.1.10 - 30.1.1.30} 
IPv6Prefix         : 2002:836b:2:1000::/64 

Online Version
Add-VpnIPAddressRange
Remove-VpnIPAddressRange