Freigeben über


Set-SCVirtualNetworkAdapterConfiguration

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

Syntax

Default (Default)

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

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

-IPv4AddressPool

Specifies a static address pool that contains IPv4 addresses.

Parameter properties

Type:StaticIPAddressPool
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

-IPv4PAAddress

Specifies a provider IP address in IPv4 format.

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

-IPv4PAAddressPool

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

Parameter properties

Type:StaticIPAddressPool
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 an IPv6 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

-IPv6AddressPool

Specifies a static address pool that contains IPv6 addresses.

Parameter properties

Type:StaticIPAddressPool
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

-IPv6PAAddress

Specifies a provider IP address in IPv6 format.

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

-IPv6PAAddressPool

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

Parameter properties

Type:StaticIPAddressPool
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

-JobVariable

Specifies that job progress is tracked and stored in the variable named by 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

-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"

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

-MACAddressPool

Specifies a MAC address pool.

Parameter properties

Type:MACAddressPool
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

-PinIPv4AddressPool

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

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

-PinIPv4PAAddressPool

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

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

-PinIPv6AddressPool

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

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

-PinIPv6PAAddressPool

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

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

-PinMACAddressPool

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

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

-PROTipID

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

Parameter properties

Type:Guid
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

-RunAsynchronously

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

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

-VirtualNetworkAdapterConfiguration

Specifies a virtual network adapter configuration object.

Parameter properties

Type:VirtualNetworkAdapterConfiguration
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMSubnet

Specifies a virtual machine subnet object.

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

Parameter properties

Type:VMSubnet
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.

Outputs

VirtualNetworkAdapterConfiguration

This cmdlet returns a VirtualNetworkAdapterConfiguration object.