The Set-VMNetworkAdapterFailoverConfiguration cmdlet sets the configuration of an IP address of a virtual network adapter to be used when a virtual machine fails over.
This example clears the current failover IPv6 settings on a virtual network adapter NetworkAdapter01 for virtual machine VM01.
Parameters
-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
Parameter sets
VMName
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ClearFailoverIPv4Settings
Clears the configured IPv4 failover settings.
The IPv4 address configured in the primary virtual machine (static or dynamic) will be used by the Replica virtual machine.
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
-ClearFailoverIPv6Settings
Clears the configured IPv6 failover settings.
The IPv6 address configured in the primary virtual machine (static or dynamic) will be used by the Replica virtual machine.
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
-ComputerName
Specifies one or more Hyper-V hosts on which the IP address configuration of a virtual network adapter is to be set.
NetBIOS names, IP addresses, and fully qualified ___domain names are allowable.
The default is the local computer.
Use localhost or a dot (.) to specify the local computer explicitly.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMName
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Credential
Specifies one or more user accounts that have permission to perform this action.
The default is the current user.
Parameter properties
Type:
PSCredential[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMName
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-IPv4Address
Specifies the IPv4 address to set on the VMNetworkAdapter for use on failover of the virtual machine.
You must also specify the IPv4SubnetMask parameter when you specify this parameter.
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
-IPv4AlternateDNSServer
Specifies the IPv4 alternate DNS server to be set on the VMNetworkAdapter for use on failover of the virtual machine.
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
-IPv4DefaultGateway
Specifies the IPv4 default gateway to be set on VMNetworkAdapter for use on failover of the virtual machine..
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
-IPv4PreferredDNSServer
Specifies the IPv4 preferred DNS server to be set on VMNetworkAdapter for use on failover of the virtual machine.
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
-IPv4SubnetMask
Specifies the IPv4 subnet mask to be set on VMNetworkAdapter for use on failover of the virtual machine.
You must specify the IPv4Address parameter when you specify this parameter.
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
-IPv6Address
Specifies the IPv6 address to be set on VMNetworkAdapter for use on failover of the virtual machine.
You must specify the IPv6SubnetPrefixLength parameter when you specify this parameter.
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
-IPv6AlternateDNSServer
Specifies the IPv6 alternate DNS server to be set on VMNetworkAdapter for use on failover of the virtual machine.
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
-IPv6DefaultGateway
Specifies the IPv6 default gateway to be set on VMNetworkAdapter for use on failover of the virtual machine.
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
-IPv6PreferredDNSServer
Specifies the IPv6 preferred DNS server to be set on VMNetworkAdapter for use on failover of the virtual machine.
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
-IPv6SubnetPrefixLength
Specifies the IPv6 subnet prefix length to be set on VMNetworkAdapter for use on failover of the virtual machine.
You must specify the IPv6Address parameter when you specify this parameter.
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
-Passthru
Specifies that a Microsoft.HyperV.PowerShell.VMNetworkAdapterFailoverConfiguration object is to be passed through to the pipeline representing the IP address configuration to be set.
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
-VM
Specifies the virtual machine for which you want to configure the IP address.
Parameter properties
Type:
VirtualMachine
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMObject
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMName
Specifies the friendly name of the virtual machine for which you want to configure the IP address.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMName
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMNetworkAdapter
Specifies the virtual network adapter for which you want to configure the IP address.
Parameter properties
Type:
VMNetworkAdapter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ResourceObject
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-VMNetworkAdapterName
Specifies the name of the virtual network adapter for which you want to set the IP address.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
VMName
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
VMObject
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
wi
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.