Set-SCVirtualNetworkAdapterConfiguration

Modifies the virtual network adapter configuration contained within a virtual machine configuration.

Syntax

Set-SCVirtualNetworkAdapterConfiguration [-IPv4Address <String>] [-IPv4AddressPool <StaticIPAddressPool>]
 [-IPv4PAAddress <String>] [-IPv4PAAddressPool <StaticIPAddressPool>] [-IPv6Address <String>]
 [-IPv6AddressPool <StaticIPAddressPool>] [-IPv6PAAddress <String>] [-IPv6PAAddressPool <StaticIPAddressPool>]
 [-JobVariable <String>] [-MACAddress <String>] [-MACAddressPool <MACAddressPool>] [-PROTipID <Guid>]
 [-PinIPv4AddressPool <Boolean>] [-PinIPv4PAAddressPool <Boolean>] [-PinIPv6AddressPool <Boolean>]
 [-PinIPv6PAAddressPool <Boolean>] [-PinMACAddressPool <Boolean>] [-RunAsynchronously] [-VMSubnet <VMSubnet>]
 -VirtualNetworkAdapterConfiguration <VirtualNetworkAdapterConfiguration> [<CommonParameters>]

Description

The Set-SCVirtualNetworkAdapterConfiguration cmdlet modifies the virtual network adapter configuration information that is contained within a virtual machine configuration.

Examples

Example 1: Set the properties of the virtual network adapter configuration for a virtual machine configuration

PS C:\> $ServiceConfig = Get-SCServiceConfiguration -Name "Service01"
PS C:\> $TierConfig = Get-SCComputerTierConfiguration -ServiceConfiguration $ServiceConfig
PS C:\> $VMConfig = Get-SCVMConfiguration -ComputerTierConfiguration $TierConfig
PS C:\> $VNAConfig = Get-SCVirtualNetworkAdapterConfiguration -VMConfiguration $VMConfig[0]
PS C:\> Set-SCVirtualNetworkAdapterConfiguration -VirtualNetworkAdapterConfiguration $VNAConfig -IPv4Address "10.255.234.155" -PinIPv4AddressPool $True

The first command gets the service configuration object named Service01 and stores the object in the $ServiceConfig variable.

The second command gets the computer tier configuration for the service configuration stored in $ServiceConfig and stores the object in the $TierConfig variable.

The third command gets the virtual machine configuration for the computer tier configuration stored in $TierConfig and stores the object in the $VMConfig variable.

The fourth command gets the virtual network adapter configuration for the first virtual machine configuration stored in $VMConfig and stores the object in the $VNAConfig variable.

The last command changes the IPv4Address property of the network adapter configuration stored in $VNAConfig, and pins the value of the IP address, which prevents it from being changed during placement.

Parameters

-IPv4Address

Specifies an IPv4 address.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv4AddressPool

Specifies a static address pool that contains IPv4 addresses.

Type:StaticIPAddressPool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv4PAAddress

Specifies a provider IP address in IPv4 format.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv4PAAddressPool

Specifies a provider IP address pool that contains IP addresses in IPv4 format.

Type:StaticIPAddressPool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6Address

Specifies an IPv6 address.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6AddressPool

Specifies a static address pool that contains IPv6 addresses.

Type:StaticIPAddressPool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6PAAddress

Specifies a provider IP address in IPv6 format.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IPv6PAAddressPool

Specifies a provider IP address pool that contains IP addresses in IPv6 format.

Type:StaticIPAddressPool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MACAddress

Specifies the media access control (MAC) address, or a set of MAC addresses, for a physical or virtual network adapter on a computer.

- Example format for a single MAC address: -MACAddress "00-15-5D-B4-DC-00"

  • Example format for a set of MAC addresses: -MACAddress "00-15-5D-B4-DC-00", "00-1A-A0-E3-75-29"

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MACAddressPool

Specifies a MAC address pool.

Type:MACAddressPool
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PinIPv4AddressPool

Indicates whether the IPv4 address pool chosen by the user is retained during service deployment configuration.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PinIPv4PAAddressPool

Indicates whether the IPv4 provider address pool chosen by the user is retained during service deployment configuration.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PinIPv6AddressPool

Indicates whether the IPv6 address pool chosen by the user is retained during service deployment configuration.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PinIPv6PAAddressPool

Indicates whether the IPv6 provider address pool chosen by the user is retained during service deployment configuration.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PinMACAddressPool

Indicates whether the MAC address pool chosen by the user is retained during service deployment configuration.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMSubnet

Specifies a virtual machine subnet object.

To obtain a VMSubnet object, use the Get-SCVMSubnet cmdlet.

Type:VMSubnet
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VirtualNetworkAdapterConfiguration

Specifies a virtual network adapter configuration object.

Type:VirtualNetworkAdapterConfiguration
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

VirtualNetworkAdapterConfiguration

This cmdlet returns a **VirtualNetworkAdapterConfiguration** object.