Export (0) Print
Expand All
Expand Minimize

Set-VpnIPAddressAssignment

Updated: August 15, 2012

Applies To: Windows Server 2012

Set-VpnIPAddressAssignment

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

Syntax

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

Parameter Set: VpnIPv6PrefixEntrypoint
Set-VpnIPAddressAssignment -EntrypointName <String> -IPv6Prefix <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PassThru] [-ThrottleLimit <Int32> ] [-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

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

none

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

none

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

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

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#VpnIPAddressAssignment

    The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.
    The object consists of the following properties:
    -- The IPv4 assignment method configured: DHCP or static pool.
    -- If static pool assignment is configured for IPv4, then the list of configured address pools. Each pool consists of a starting IP address and an ending IP address.
    -- The IPv6 prefix configured.


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 

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft