Set-NetVirtualizationProviderAddress
Changes a VLAN ID or prefix length for a Provider Address.
Syntax
ByName (Default)
Set-NetVirtualizationProviderAddress
[-ProviderAddress <String[]>]
[-InterfaceIndex <UInt32[]>]
[-AddressState <AddressState[]>]
[-VlanID <UInt16>]
[-PrefixLength <Byte>]
[-MACAddress <String>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[<CommonParameters>]
InputObject (cdxml)
Set-NetVirtualizationProviderAddress
-InputObject <CimInstance[]>
[-VlanID <UInt16>]
[-PrefixLength <Byte>]
[-MACAddress <String>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[<CommonParameters>]
Description
The Set-NetVirtualizationProviderAddress cmdlet changes a virtual local area network (VLAN) ID or prefix length for Provider Addresses used with Microsoft® Hyper-V® Server 2016 Network Virtualization. For more information, see Network Virtualization technical details on TechNet.
You can specify which Provider Addresses to modify by using address state, interface index, or IP address, or you can use the Get-NetVirtualizationProviderAddress cmdlet to get Provider Addresses to modify.
Examples
Example 1: Change a virtual LAN ID
PS C:\> Set-NetVirtualizationProviderAddress -ProviderAddress "192.168.2.3" -InterfaceIndex 17 -VlanID 201
This command changes the virtual LAN ID for the Provider Address 192.168.2.3 on the interface that has the Index 17.
Example 2: Change a virtual LAN ID for specified Provider Addresses
PS C:\>Get-NetVirtualizationProviderAddress -InterfaceIndex 23 | Set-NetVirtualizationProviderAddress -VlanID 20
This command uses the Get-NetVirtualizationProviderAddress cmdlet to get all the Provider Addresses for the interface that has the index 23, and then passes them to the Set-NetVirtualizationProviderAddress cmdlet by using the pipeline operator. The command assigns a value of 20 for the virtual LAN ID of all the Provider Address for the interface.
Parameters
-AddressState
Specifies an array of states of Provider Addresses. The acceptable values for this parameter are:
- Preferred. The address is unique.
- Tentative. The address is not yet verified.
- Duplicate. There is a duplicate address on the network.
- Invalid. The address lifetime has expired.
- Deprecated. The address cannot start new connections.
Parameter properties
| Type: | AddressState[] |
| Default value: | None |
| Accepted values: | Invalid, Tentative, Duplicate, Deprecated, Preferred |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByName
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-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.
Parameter properties
| Type: | CimSession[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | Session |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-InputObject
Specifies the input object that is used in a pipeline command.
Parameter properties
| Type: | CimInstance[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
InputObject (cdxml)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-InterfaceIndex
Specifies an array of indexes for network interfaces that have Hyper-V Server 2016 Network Virtualization enabled.
Parameter properties
| Type: | UInt32[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByName
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-MACAddress
Specifies a media access control (MAC) address that corresponds to the Provider Address.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PrefixLength
Specifies the length of an IP prefix.
Parameter properties
| Type: | Byte |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ProviderAddress
Specifies an array of IP addresses. You can use IPv4 or IPv6 addresses.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByName
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ThrottleLimit
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.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VlanID
Specifies an ID for a VLAN for the Provider Address.
Parameter properties
| Type: | UInt16 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.