New-SCVirtualNetworkAdapter
New-SCVirtualNetworkAdapter
Creates a virtual network adapter on a virtual machine, virtual machine template, or hardware profile used in VMM.
構文
Parameter Set: VM
New-SCVirtualNetworkAdapter [[-VirtualNetwork] <String> ] -VM <VM> [-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] [-NoVMNetwork] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Synthetic] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMNetwork <VMNetwork> ] [-VMSubnet <VMSubnet> ] [-VMwarePortGroup <String> ] [ <CommonParameters>]
Parameter Set: HardwareProfile
New-SCVirtualNetworkAdapter [[-VirtualNetwork] <String> ] -HardwareProfile <HardwareProfile> [-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] [-NoVMNetwork] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Synthetic] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMNetwork <VMNetwork> ] [-VMNetworkServiceSetting <String> ] [-VMSubnet <VMSubnet> ] [-VMwarePortGroup <String> ] [ <CommonParameters>]
Parameter Set: JobGroup
New-SCVirtualNetworkAdapter [[-VirtualNetwork] <String> ] -JobGroup <Guid]> [-EnableGuestIPNetworkVirtualizationUpdates <Boolean> ] [-EnableMACAddressSpoofing <Boolean> ] [-EnableVMNetworkOptimization <Boolean> ] [-IPv4AddressType <EthernetAddressType> {Dynamic | Static} ] [-IPv6AddressType <EthernetAddressType> {Dynamic | Static} ] [-JobVariable <String> ] [-LogicalNetwork <LogicalNetwork> ] [-LogicalSwitch <LogicalSwitch> ] [-MACAddress <String> ] [-MACAddressType <String> ] [-NetworkLocation <String> ] [-NetworkTag <String> ] [-NoConnection] [-NoVMNetwork] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Synthetic] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMHost <Host> ] [-VMMServer <ServerConnection> ] [-VMNetwork <VMNetwork> ] [-VMNetworkServiceSetting <String> ] [-VMSubnet <VMSubnet> ] [-VMwarePortGroup <String> ] [ <CommonParameters>]
Parameter Set: Template
New-SCVirtualNetworkAdapter [[-VirtualNetwork] <String> ] -VMTemplate <Template> [-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] [-NoVMNetwork] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Synthetic] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMNetwork <VMNetwork> ] [-VMNetworkServiceSetting <String> ] [-VMSubnet <VMSubnet> ] [-VMwarePortGroup <String> ] [ <CommonParameters>]
Parameter Set: VMHost
New-SCVirtualNetworkAdapter -LogicalSwitch <LogicalSwitch> -VMHost <Host> [-IPv4Address <String> ] [-IPv4AddressPool <StaticIPAddressPool> ] [-IPv4AddressType <EthernetAddressType> {Dynamic | Static} ] [-IPv6Address <String> ] [-IPv6AddressPool <StaticIPAddressPool> ] [-IPv6AddressType <EthernetAddressType> {Dynamic | Static} ] [-JobGroup <Guid]> ] [-JobVariable <String> ] [-MACAddress <String> ] [-MACAddressType <String> ] [-Name <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PortClassification <PortClassification> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VLanEnabled <Boolean]> ] [-VLanID <UInt16> ] [-VMNetwork <VMNetwork> ] [-VMSubnet <VMSubnet> ] [ <CommonParameters>]
詳細説明
The New-SCVirtualNetworkAdapter cmdlet creates a virtual network adapter on a virtual machine, virtual machine template, or hardware profile used to create virtual machines managed by Virtual Machine Manager (VMM).
You can use the New-SCVirtualNetworkAdapter cmdlet to specify a network location and connect the virtual network adapter to a virtual network configured on the host when you create the adapter, or you can configure those and other settings later by using the Set-SCVirtualNetworkAdapter cmdlet.
Additionally, you can specify whether the virtual network adapter uses a static or dynamic MAC address, and you can specify a static MAC address.
You can use the New-SCVirtualNetworkAdapter cmdlet to create an adapter whose type is either emulated or synthetic. The default is emulated.
For virtual machines on any type of host (Hyper-V, VMware, or XenServer), you can configure a virtual network adapter on the virtual machine that emulates a specific physical network adapter.
For virtual machines on Hyper-V hosts, if the guest operating system installed on a virtual machine is a virtualization-aware operating system (for example, Windows Server 2008 or Windows Server 2012, and some versions of Linux), VMM lets you configure a high-performance synthetic virtual network adapter on the virtual machine to communicate with the physical hardware on the host. You must explicitly specify that a virtual network adapter is synthetic by using the Synthetic parameter.
VMM includes support for configuring one or more virtual area networks (VLANs) on a host for use by virtual machines deployed on that host. You can use the New-SCVirtualNetworkAdapter cmdlet or the Set-SCVirtualNetworkAdapter cmdlet with the VLAN parameters to attach the virtual network adapter on a virtual machine to a VLAN. To configure corresponding VLAN settings on the host network adapter, use the Add-SCVMHostNetworkAdapter cmdlet or the Set-SCVMHostNetworkAdapter cmdlet.
For an illustration of how to configure VLANs, see the examples for this cmdlet, and see the examples for New-SCVMHostNetworkAdapterConfig and Set-SCVMHostNetworkAdapter.
パラメーター
-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 |
-HardwareProfile<HardwareProfile>
Specifies a hardware profile object.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-IPv4Address<String>
Specifies an IPv4 address.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-IPv4AddressPool<StaticIPAddressPool>
Specifies a static address pool that contains IPv4 addresses.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-IPv4AddressType<EthernetAddressType>
Specifies an IPv4 address type.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-IPv6Address<String>
Specifies an IPv6 address.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-IPv6AddressPool<StaticIPAddressPool>
Specifies a static address pool that contains IPv6 addresses.
エイリアス |
none |
必須? |
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 |
-LogicalSwitch<LogicalSwitch>
Specifies a logical switch object.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
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 |
-Name<String>
Specifies the name of a network object.
エイリアス |
none |
必須? |
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 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 |
-NoVMNetwork
Indicates that a VM network is not specified.
エイリアス |
NoLogicalNetwork |
必須? |
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 |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
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 |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Synthetic
Indicates that a device, such as a virtual network adapter, on a virtual machine deployed on a Hyper-V host is a high-performance synthetic device. Requires a virtualization-aware guest operating system on the virtual machine.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VirtualNetwork<String>
Specifies a virtual network object.
エイリアス |
none |
必須? |
false |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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 |
-VM<VM>
Specifies a virtual machine object.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMHost<Host>
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.
For more information about each type of host, type Get-Help Add-SCVMHost -detailed
. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VMNetwork<VMNetwork>
Specifies a VM network object.
To get a VM network object, use the Get-SCVMNetwork cmdlet.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMNetworkServiceSetting<String>
Specifies a VM network service setting.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
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 |
-VMTemplate<Template>
Specifies a VMM template object used to create virtual machines.
エイリアス |
Template |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
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 machine object, virtual machine template object, or hardware profile object, which can be retrieved by using the Get-SCVirtualMachine, Get-SCVMTemplate, and Get-SCHardwareProfile cmdlets, respectively.
例
Example Example 1: Create a virtual network adapter on a virtual machine.
The first command gets the virtual machine object named VM01, and then stores the object in the $VM variable.
The second command creates a virtual network adapter on VM01.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> New-SCVirtualNetworkAdapter -VM $VM
Example 2: Create a virtual network adapter on a virtual machine template
The first command gets the virtual machine template object named VMTemplate01, and then stores the object in the $VMTemplate variable.
The second command creates a virtual network adapter on VMTemplate01.
PS C:\> $VMTemplate = Get-SCVMTemplate | where { $_.Name -eq "VMTemplate01" }
PS C:\> New-SCVirtualNetworkAdapter -VMTemplate $VMTemplate
Example Example 3: Create an emulated virtual network adapter and a synthetic virtual network adapter on a hardware profile.
The first command gets the hardware profile object named NewHWProfile01 from the VMM library, and then stores the object in the $HWProfile variable.
The second command creates a virtual network adapter on NewHWProfile01. This adapter is a native or emulated adapter.
The last command creates a synthetic virtual network adapter on NewHWProfile01.
PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01" }
PS C:\> New-SCVirtualNetworkAdapter -HardwareProfile $HWProfile
PS C:\> New-SCVirtualNetworkAdapter -HardwareProfile $HWProfile -Synthetic
Example 4: Create a virtual network adapter on a virtual machine and assign it a unique MAC address
The first command gets the virtual machine object named VM04, and then stores the object in the $VM variable.
The second command creates a virtual network adapter on the virtual machine stored in $VM, and then stores the object in the $VNIC variable.
The third command gets the MAC address pool object named MAC Address Pool 01, and then stores the object in the $MACPool variable.
The last command gets the next available MAC address from the address pool stored in $MACPool, and assigns it to the virtual network adapter stored in $VNIC.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM04"
PS C:\> $VNIC = New-SCVirtualNetworkAdapter -VM $VM
PS C:\> $MACPool = Get-SCMACAddressPool -Name "MAC Address Pool 01"
PS C:\> Grant-SCMACAddress -MACAddressPool $MACPool -VirtualNetworkAdapter $VNIC
Example 5: Create a virtual network adapter with a static MAC address and a specific VLAN ID
The first command gets the virtual machine object named VM05 and then stores the object in the $VM variable.
The second command gets the logical network object named LogicalNetwork01 and then stores the object in the $LogicalNet variable.
The third command gets the virtual network object named ExternalVirtualNetwork01 and stores the object in the $VirtualNet variable.
The last command creates a new virtual network adapter for VM05, connects the adapter to the logical network stored in $LogicalNet and the virtual network stored in $VirtualNet. The command provides a static MAC address for the virtual network adapter, enables VLAN and specifies a VLAN ID of 3.
Note: This example assumes that that your host is already connected to a VLAN or, if not, that your host has two network adapters. If your host has a single network adapter, assigning the adapter to a VLAN that is unavailable to the VMM server will prevent VMM from managing the host.
PS C:\> $VM = Get-SCVirtualMachine -Name "VM05"
PS C:\> $LogicalNet = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> $VirtualNet = Get-SCVirtualNetwork -Name "ExternalVirtualNetwork01"
PS C:\> New-SCVirtualNetworkAdapter -VM $VM -LogicalNetwork $LogicalNet -VirtualNetwork $VirtualNet -MACAddress "00-16-D3-CC-00-1A" -MACAddressType "Static" -VLANEnabled $True -VLANId 3
関連トピック
New-SCVMHostNetworkAdapterConfig