The Set-NetVirtualizationLookupRecord cmdlet changes settings for lookup record policy entries for IP addresses that belong to a Microsoft® Hyper-V® Server 2016 virtual network.
Network Virtualization allows for more than one virtual network to exist on the same physical network.
Computers can exchange network traffic with a virtual machine by using a Customer Address in the virtual network.
Network Virtualization manages the Provider Addresses that are the physical network addresses.
This cmdlet modifies records that map a Customer Address to a Provider Address.
For more information, see Network Virtualization technical details on TechNet.
You can update the Provider Address, customer ID, context, virtual machine name, and whether to use a virtual machine media access control (MAC) address.
You can specify which policy entries to update by using a Customer Address, a MAC address, a rule type, or a virtual subnet ID, or you can use the Get-NetVirtualizationLookupRecord cmdlet to obtain a policy entry.
This command uses the Get-NetVirtualizationLookupRecord cmdlet to get all the entries with a virtual subnet ID of 10000 and uses the pipe operator to pass them to the Set-NetVirtualizationLookupRecord cmdlet.
This cmdlet changes the context to a descriptive phrase and changes the customer ID to a specified string.
Example 2: Change Provider Address and virtual subnet ID
This command makes changes for the entry that has the Customer Address 10.0.22.1.
It sets the physical address to 172.23.1.1.
Parameters
-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
-Context
Specifies a comment regarding the policy entry.
Administrators can use this comment for any purpose.
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
-CustomerAddress
Specifies an array of IP addresses in the Customer Address network.
You can use both IPv4 and 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
-CustomerID
Specifies an ID for a policy entry or virtual machine.
Administrators can use this setting for any purpose.
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
-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
-MACAddress
Specifies a MAC address that corresponds to the Customer Address.
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
-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
-ProviderAddress
Specifies an IP address, either IPv4 or IPv6, for a physical address that corresponds to the Customer 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
-Rule
Specifies which type of virtualization mechanism that the policy entry uses.
The acceptable values for this parameter are:
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
-UseVmMACAddress
Indicates whether this entry uses its defined MAC address instead of physical MAC address.
Virtual networking can use different MAC addresses for different virtual machines to balance traffic among multiple CPU cores.
A value of $True is only valid if the Rule parameter has a value of TranslationMethodNat.
The default value for this setting is $False.
Parameter properties
Type:
Boolean
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
-VirtualSubnetID
Specifies an array of IDs for virtual subnets that Customer Addresses belongs to.
The acceptable values for this parameter are: integers from 4096 through 16777214.
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
-VMName
Specifies a name for the virtual machine for this policy entry.
Administrators can use this name for any purpose.
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
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.