New-SCVMHostNetworkAdapterConfig
建立主機網路介面卡組態。
Syntax
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsPhysicalNetworkAdapter]
-LogicalSwitch <LogicalSwitch>
-UplinkPortProfileSet <UplinkPortProfileSet>
[-MACAddress <String>]
[-ConsistentDeviceName <String>]
[-DisableAdapterDNSRegistration <Boolean>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsPhysicalNetworkAdapter]
[-SetAsGenericNIC]
[-UseStaticIPForIPConfiguration]
-LogicalNetwork <LogicalNetwork>
[-MACAddress <String>]
[-ConsistentDeviceName <String>]
[-IPv4Subnet <String>]
[-IPv6Subnet <String>]
[-IPv4Address <String>]
[-IPv6Address <String>]
[-DisableAdapterDNSRegistration <Boolean>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsPhysicalNetworkAdapter]
[-SetAsManagementNIC]
[-UseDhcpForIPConfiguration]
[-MACAddress <String>]
[-ConsistentDeviceName <String>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsPhysicalNetworkAdapter]
[-SetAsGenericNIC]
[-UseDhcpForIPConfiguration]
[-MACAddress <String>]
[-ConsistentDeviceName <String>]
[-DisableAdapterDNSRegistration <Boolean>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsPhysicalNetworkAdapter]
[-SetAsManagementNIC]
[-UseStaticIPForIPConfiguration]
-LogicalNetwork <LogicalNetwork>
[-MACAddress <String>]
[-ConsistentDeviceName <String>]
[-IPv4Subnet <String>]
[-IPv6Subnet <String>]
[-IPv4Address <String>]
[-IPv6Address <String>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsVirtualNetworkAdapter]
[-SetAsGenericNIC]
[-UseDhcpForIPConfiguration]
-LogicalSwitch <LogicalSwitch>
[-PortClassification <PortClassification>]
-VMNetwork <VMNetwork>
[-MACAddress <String>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsVirtualNetworkAdapter]
[-SetAsGenericNIC]
[-UseStaticIPForIPConfiguration]
-LogicalSwitch <LogicalSwitch>
[-PortClassification <PortClassification>]
-VMNetwork <VMNetwork>
[-MACAddress <String>]
[-IPv4Subnet <String>]
[-IPv6Subnet <String>]
[-IPv4Address <String>]
[-IPv6Address <String>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsVirtualNetworkAdapter]
[-SetAsManagementNIC]
-TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterConfig>
[-UseDhcpForIPConfiguration]
-LogicalSwitch <LogicalSwitch>
[-PortClassification <PortClassification>]
-VMNetwork <VMNetwork>
[-MACAddress <String>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
New-SCVMHostNetworkAdapterConfig
[-VMMServer <ServerConnection>]
[-SetAsVirtualNetworkAdapter]
[-SetAsManagementNIC]
-TransientManagementNetworkAdapter <PhysicalComputerNetworkAdapterConfig>
[-UseStaticIPForIPConfiguration]
-LogicalSwitch <LogicalSwitch>
[-PortClassification <PortClassification>]
-VMNetwork <VMNetwork>
[-MACAddress <String>]
[-IPv4Subnet <String>]
[-IPv6Subnet <String>]
[-IPv4Address <String>]
[-IPv6Address <String>]
[-AdapterName <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
New-SCVMHostNetworkAdapterConfig Cmdlet 會建立主機網路介面卡組態,用於主機作業系統部署程式。
範例
範例 1:使用靜態 IP 位址建立管理實體主機網路介面卡組態
PS C:\> $LogicalNetwork = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> New-SCVMHostNetworkAdapterConfig -SetAsPhysicalNetworkAdapter -SetAsManagementNIC -UseStaticIPForIPConfiguration -LogicalNetwork $LogicalNetwork -MacAddress "00-1D-D8-B7-1C-00" -IPv4Subnet "10.0.0.1/24"
第一個命令會取得名為 LogicalNetwork01 的邏輯網路物件,並將物件儲存在$LogicalNetwork變數中。
第二個命令會建立實體主機網路介面卡組態,並將其設定為管理網路介面卡,並在 IP 組態期間使用靜態 IP 位址。 此設定包括 LogicalNetwork01、提供的 MAC 位址和指定的子網。
範例 2:建立使用邏輯交換器的實體主機網路介面卡組態
PS C:\> $LogicalSwitch = Get-SCLogicalSwitch -Name "LogicalSwitch01"
PS C:\> $UplinkPortProfSet = Get-SCUplinkPortProfileSet -Name "UplinkPortProfileSet01"
PS C:\> New-SCVMHostNetworkAdapterConfig -SetAsPhysicalNetworkAdapter -LogicalSwitch $LogicalSwitch -UplinkPortProfileSet $UplinkPortProfSet
第一個命令會取得名為 LogicalSwitch01 的邏輯交換器物件,並將物件儲存在$LogicalSwitch變數中。
第二個命令會取得名為 UplinkPortProfileSet01 的上行通訊埠設定檔集物件,並將物件儲存在 $UplinkPortProfSet 變數中。
最後一個命令會使用 LogicalSwitch01 和 UplinkPortProfileSet01 建立實體主機網路介面卡組態。
範例 3:使用 DHCP 建立一般虛擬主機網路介面卡組態
PS C:\> $LogicalSwitch = Get-SCLogicalSwitch -Name "LogicalSwitch01"
PS C:\> $VMNetwork = Get-SCVMNetwork -Name "VMNetwork01"
PS C:\> New-SCVMHostNetworkAdapterConfig -SetAsVirtualNetworkAdapter -SetAsGenericNIC -UseDhcpForIPConfiguration -LogicalSwitch $LogicalSwitch -VMNetwork $VMNetwork
第一個命令會取得名為 LogicalSwitch01 的邏輯交換器物件,並將物件儲存在$LogicalSwitch變數中。
第二個命令會取得名為 VMNetwork01 的 VM 網路物件,並將物件儲存在$VMNetwork變數中。
最後一個命令會使用使用 DHCP 取得 IP 位址的 LogicalSwtich01 和 VMNetwork01 建立一般虛擬網路組態。
參數
-AdapterName
指定網路介面卡的名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ConsistentDeviceName
指定網路介面卡的一致裝置名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableAdapterDNSRegistration
指出是否要停用網路介面卡的 DNS 註冊。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv4Address
指定 IPv4 位址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv4Subnet
指定 IPv4 子網。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv6Address
指定 IPv6 位址。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv6Subnet
指定 IPv6 子網。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定追蹤工作進度,並將工作進度存放在這個參數命名的變數中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogicalNetwork
指定邏輯網路。 邏輯網路是 IP 子網和 VLAN 的具名群組,可用來組織及簡化網路指派。
Type: | LogicalNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogicalSwitch
指定邏輯交換器物件。
Type: | LogicalSwitch |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MACAddress
指定電腦上的實體或虛擬網路介面卡的媒體存取控制 (MAC) 位址或一組 MAC 位址。 有效值為:一或多個 MAC 位址。
單一 MAC 位址的範例格式:
-MACAddress "00-15-5D-B4-DC-00"
一組 MAC 位址的範例格式:
-MACAddress "00-15-5D-B4-DC-00", "00-1A-A0-E3-75-29"
一組 MAC 位址的範例格式:
$Macs = "00-15-5D-B4-DC-00", "00-1A-A0-E3-75-29"
Set-SCPXEServer -MACAddress $Macs
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PortClassification
指定虛擬網路介面卡所連線之交換器的埠分類。
Type: | PortClassification |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定觸發此動作 (PRO 提示) 效能和資源優化提示的識別碼。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SetAsGenericNIC
表示網路介面卡不是主機的管理網路介面卡。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SetAsManagementNIC
表示網路介面卡是主機的管理網路介面卡。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SetAsPhysicalNetworkAdapter
表示網路介面卡是實體網路介面卡。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SetAsVirtualNetworkAdapter
表示網路介面卡是虛擬網路介面卡。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TransientManagementNetworkAdapter
指定管理虛擬網路介面卡在初始作業系統部署階段期間系結至的實體網路介面卡。 在部署主機之前,會暫時使用這個屬性。
Type: | PhysicalComputerNetworkAdapterConfig |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UplinkPortProfileSet
指定上行通訊埠設定檔集物件。
若要取得上行通訊埠設定檔集物件,請使用 Get-SCUplinkPortProfileSet Cmdlet。
Type: | UplinkPortProfileSet |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UseDhcpForIPConfiguration
表示使用 DHCP 取得網路介面卡的 IP 位址。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UseStaticIPForIPConfiguration
表示網路介面卡已設定為靜態 IP 位址。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定 VMM 伺服器物件。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMNetwork
指定 VM 網路物件。
若要取得 VM 網路物件,請使用 Get-SCVMNetwork Cmdlet。
Type: | VMNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
輸出
HostNetworkAdapterConfig
此 Cmdlet 會傳回 HostNetworkAdapterConfig 物件。