Set-SCVirtualNetworkAdapter

Set-SCVirtualNetworkAdapter

Changes properties of a virtual network adapter.

構文

Parameter Set: IsCheckpoint
Set-SCVirtualNetworkAdapter [[-VirtualNetworkAdapter] <VirtualNetworkAdapter> ] -Checkpoint -VirtualNetwork <String> [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: SlotIdSpecified
Set-SCVirtualNetworkAdapter -JobGroup <Guid]> -SlotID <Int32]> [-EnableGuestIPNetworkVirtualizationUpdates <Boolean> ] [-EnableMACAddressSpoofing <Boolean> ] [-EnableVMNetworkOptimization <Boolean> ] [-IPv4AddressType <EthernetAddressType> {Dynamic | Static} ] [-IPv6AddressType <EthernetAddressType> {Dynamic | Static} ] [-JobVariable <String> ] [-LogicalNetwork <LogicalNetwork> ] [-MACAddress <String> ] [-MACAddressType <String> ] [-NetworkLocation <String> ] [-NetworkTag <String> ] [-NoConnection] [-NoLogicalNetwork] [-NoPortClassification] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RequiredBandwidth <Decimal> ] [-RunAsynchronously] [-VirtualNetwork <String> ] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMMServer <ServerConnection> ] [-VMNetwork <VMNetwork> ] [-VMNetworkServiceSetting <String> ] [-VMSubnet <VMSubnet> ] [-VMwarePortGroup <String> ] [ <CommonParameters>]

Parameter Set: VirtualNicSpecified
Set-SCVirtualNetworkAdapter [-VirtualNetworkAdapter] <VirtualNetworkAdapter> [-EnableGuestIPNetworkVirtualizationUpdates <Boolean> ] [-EnableMACAddressSpoofing <Boolean> ] [-EnableVMNetworkOptimization <Boolean> ] [-IPv4Addresses <0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-IPv4AddressPools <0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]> ] [-IPv4AddressType <EthernetAddressType> {Dynamic | Static} ] [-IPv6Addresses <0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-IPv6AddressPools <0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]> ] [-IPv6AddressType <EthernetAddressType> {Dynamic | Static} ] [-JobGroup <Guid]> ] [-JobVariable <String> ] [-LogicalNetwork <LogicalNetwork> ] [-MACAddress <String> ] [-MACAddressType <String> ] [-NetworkLocation <String> ] [-NetworkTag <String> ] [-NoConnection] [-NoLogicalNetwork] [-NoPortClassification] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RequiredBandwidth <Decimal> ] [-RunAsynchronously] [-VirtualNetwork <String> ] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMMServer <ServerConnection> ] [-VMNetwork <VMNetwork> ] [-VMNetworkServiceSetting <String> ] [-VMSubnet <VMSubnet> ] [-VMwarePortGroup <String> ] [ <CommonParameters>]

詳細説明

The Set-SCVirtualNetworkAdapter cmdlet changes one or more properties of a virtual network adapter associated with a virtual machine, virtual machine template, or hardware profile used to create virtual machines in a Virtual Machine Manager (VMM) environment.

Properties you can change include the following:

-- Connect a virtual network adapter to a virtual network.
-- Disconnect a virtual network adapter from a virtual network.
-- Specify a network location and network tag on a virtual network adapter.
-- Specify a MAC address on the virtual network adapter.
-- Enable the use of a virtual local area network (VLAN) and specify a VLAN ID (numerical identifier) for that VLAN on the virtual network adapter.

パラメーター

-Checkpoint

Specifies the Can Checkpoint permission.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableGuestIPNetworkVirtualizationUpdates<Boolean>

Indicates whether IP network virtualization updates by a guest is enabled.

エイリアス

GuestIPNetworkVirtualizationUpdatesEnabled

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableMACAddressSpoofing<Boolean>

Indicates whether to enable, when set to $True, MAC Address spoofing.

エイリアス

MACAddressesSpoofingEnabled

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableVMNetworkOptimization<Boolean>

Indicates whether to enable, when set to $True, virtual machine network optimization. This feature improves network performance for virtual machines with network adapters that support virtual machine queue (VMQ) or TCP Chimney Offload. VMQ enables creating a unique network queue for each virtual network adapter. TCP Chimney Offload enables network traffic processing to be offloaded from the networking stack.

エイリアス

VMNetworkOptimizationEnabled

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IPv4Addresses<0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>

Specifies a list of IPv4 addresses.

エイリアス

IPv4Address

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IPv4AddressPools<0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]>

Specifies a list of IPv4 address pools.

エイリアス

IPv4AddressPool

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IPv4AddressType<EthernetAddressType>

Specifies an IPv4 address type.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IPv6Addresses<0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>

Specifies a list of IPv6 addresses.

エイリアス

IPv6Address

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IPv6AddressPools<0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]>

Specifies a list of IPv6 address pools.

エイリアス

IPv6AddressPool

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IPv6AddressType<EthernetAddressType>

Specifies an IPv6 address type.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-JobGroup<Guid]>

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-JobVariable<String>

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

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-LogicalNetwork<LogicalNetwork>

Specifies a logical network. A logical network is a named grouping of IP subnets and VLANs that is used to organize and simplify network assignments.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MACAddress<String>

Specifies the Media Access Control (MAC) address, or a set of MAC addresses, for a physical or virtual network adapter on a computer. Valid values are: one or more MAC addresses.

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"

Example format for a set of MAC addresses:

$Macs = "00-15-5D-B4-DC-00", "00-1A-A0-E3-75-29"

Set-SCPXEServer –MACAddress $Macs

NOTE: When used with New-SCPXEServer or Set-SCPXEServer, the MACAddress parameter updates the PXE interfaces from which the SCDM PXE Server listens for and responds to PXE requests.

エイリアス

EthernetAddress,PhysicalAddress

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MACAddressType<String>

Specifies the type of MAC address to use for a virtual network adapter. Valid values are: Static, Dynamic.

エイリアス

EthernetAddressType,PhysicalAddressType

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NetworkLocation<String>

Specifies the network location for a physical network adapter or for a virtual network adapter, or changes the default network location of a host's physical network adapter.

Example formats:

-NetworkLocation $NetLoc ($NetLoc might contain "Corp.Contoso.com")

-OverrideNetworkLocation $TRUE -NetworkLocation "HostNICNewLocation.Contoso.com"

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NetworkTag<String>

Specifies a word or phrase to associate with a virtual network adapter that is configured to connect to a specific internal or external network on the host. The NetworkTag identifies all virtual machines with the same NetworkTag as members of the same network. VMM uses a NeworkTag (if one exists) when it evaluates hosts as possible candidates on which to deploy a virtual machine. If the host does not include virtual machines on the network with the same NetworkTag as the virtual machine to be placed, the host receives zero stars in the placement process.

エイリアス

Tag

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NoConnection

Disconnects a virtual network adapter from a virtual network.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NoLogicalNetwork

Indicates that no logical network is associated with this virtual network adapter.

エイリアス

NoVMNetwork

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NoPortClassification

Indicates that a port classification is not provided.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-OnBehalfOfUser<System.String>

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PortClassification<PortClassification>

Specifies the port classification of the switch to which the virtual network adapter connects.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RequiredBandwidth<Decimal>

Specifies the network bandwidth required by a network adapter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RunAsynchronously

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

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-SlotID<Int32]>

Specifies a numerical ID used to identify a device.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VirtualNetwork<String>

Specifies a virtual network object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VirtualNetworkAdapter<VirtualNetworkAdapter>

Specifies a virtual network adapter object for a virtual machine. The number of virtual adapters for each type of host are:

-- Hyper-V: Up to four emulated adapters per virtual machine, and up to eight synthetic adapters per virtual machine. No driver is available for an emulated network adapter on a Windows Server 2003 x64 guest.
-- VMware ESX: Up to four emulated adapters per virtual machine.
-- Citrix XenServer: Up to seven emulated adapters per virtual machine.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VLanEnabled<Boolean]>

Indicates whether the cmdlet enables a virtual LAN (VLAN) for use by virtual machines on a Hyper-V or Citrix XenServer host.

Example format for a single VLAN: -VLanEnabled $True -VLanMode "Access" -VLanID 35

Example format for multiple VLANs: -VLanEnabled $True -VLanMode "Trunk" -VLanTrunkID 1,2,100,200,1124

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VLanID<UInt16>

Assigns a numerical identifier in the range 1-4094 to a virtual network adapter on a virtual machine or to a physical network adapter on a virtual machine host.

Configure a VLanID on a Hyper-V, VMware ESX, or Citrix XenServer host:

-- On an externally bound physical network adapter when the VLan mode is Access.

Configure a VLanID on a virtual network adapter of a virtual machine:

-- Bound to a physical network adapter on the host, or
-- Bound to an internal virtual network on the host.

Example format: -VLanEnabled $True -VLanMode "Access" -VLanID 35

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VMNetwork<VMNetwork>

Specifies a VM network object.

To get a VM network object, use the Get-SCVMNetwork cmdlet.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMNetworkServiceSetting<String>

Specifies a VM network service setting.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMSubnet<VMSubnet>

Specifies a VM subnet object.

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

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMwarePortGroup<String>

Specifies the VMware port group.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • VirtualNetworkAdapter

  • This cmdlet requires a VMM virtual network adapter object, which can be retrieved by using the Get-SCVirtualNetworkAdapter cmdlet.

Example 1: Connect a virtual network adapter to a virtual network

The first command gets the virtual machine object named VM01, and then stores the object in the $VM variable.

The second command gets all virtual network adapter objects on VM01, selects the adapter object with the MAC address of 00:16:D3:CC:00:1B, and then stores the object in the $Adapter variable.

The last command connects the virtual network adapter stored in $Adapter to the virtual network named ExternalVirtualNetwork01 on the host that contains VM01.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> $Adapter = Get-SCVirtualNetworkAdapter -VM $VM | where { $_.PhysicalAddress -eq "00:16:D3:CC:00:1B" }
PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $Adapter -VirtualNetwork "ExternalVirtualNetwork01"

Example 2: Specify a static MAC address for a virtual network adapter

The first command gets the virtual machine object named VM02, and then stores the object in the $VM variable.

The second command gets all virtual network adapter objects on VM02, selects the virtual network adapter with the specified ID, and then stores the object in the $Adapter variable. This example assumes that this adapter currently has a dynamic MAC address.

The last command specifies that the virtual network adapter stored in $Adapter use the static MAC address 00:16:D3:CC:00:1C.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM02"
PS C:\> $Adapter = Get-SCVirtualNetworkAdapter -VM $VM | where { $_.ID -eq "5c0ee80a-731f-41c8-92f0-85a1619f9a1b" }
PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $Adapter -PhysicalAddressType "Static" -PhysicalAddress "00:16:D3:CC:00:1C"

Example 3: Specify a static MAC address and assign it to an existing virtual network adapter

The first command gets the virtual machine object named VM03, and then stores the object in the $VM variable.

The second command gets the virtual network adapter object on VM03 by ID, specifies that the adapter uses a static MAC address type, and assigns it a MAC address.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM03"
PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter (Get-VirtualNetworkAdapter -VM $VM | where { $_.ID -eq "95e9cfda-861c-44a3-b2ba-2f796dfe691c"}) -MACAddressType "Static" -MACAddress "00-00-00-00-00-00"

Example Example 4:. Disconnect the specified virtual network adapter from the virtalvirtual network.:virtual

The first command gets the virtual machine object named VM04, and then stores the object in the $VM variable.

The second command gets all virtual network adapter objects on VM04, and then stores the adapter objects in $Adapters. This example assumes that VM04 has at least 2 virtual network adapters.

The last command uses the NoConnection parameter to disconnect the second virtual network adapter, Adapters[1], from any virtual network that it is connected to.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM04"
PS C:\> $Adapters = Get-SCVirtualNetworkAdapter -VM $VM
PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $Adapters[1] -NoConnection

Example 5: Specify a VMware port group for an existing virtual machine

The first command gets the virtual machine object named VM05, and then stores the object in the $VM variable.

The second command stores the first [0] virtual network adapter on VM05 in the $Adapter variable.

The last command sets the virtual network adapter for the adapter stored in $Adapter to Virtual Machine Network. Virtual Machine Network is the name of the VMware port group that you want this adapter to connect to.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM05"
PS C:\> $Adapter = $VM.VirtualNetworkAdapters[0]
PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $Adapter -VMwarePortGroup "Virtual Machine Network" 

関連トピック

Add-SCVMHostNetworkAdapter

Get-SCVirtualNetwork

Get-SCVirtualNetworkAdapter

New-SCVirtualNetwork

New-SCVirtualNetworkAdapter

Remove-SCVirtualNetworkAdapter

Set-SCVirtualNetwork

Set-SCVMHostNetworkAdapter