Set-SCLogicalSwitchVirtualNetworkAdapter
將設定中的任何變更認可至連線至邏輯交換器的現有虛擬網路介面卡 (VNIC) 。
Syntax
Set-SCLogicalSwitchVirtualNetworkAdapter
[-LogicalSwitchVirtualNetworkAdapter] <LogicalSwitchVirtualNetworkAdapter>
[-EthernetAddressType <EthernetAddressType>]
[-IPv4AddressType <EthernetAddressType>]
[-IPv6AddressType <EthernetAddressType>]
[-VMNetwork <VMNetwork>]
[-VMSubnet <VMSubnet>]
[-PortClassification <PortClassification>]
[-VLanEnabled <Boolean>]
[-VLanID <UInt16>]
[-IPv4AddressPool <StaticIPAddressPool>]
[-IPv6AddressPool <StaticIPAddressPool>]
[-InheritsAddressFromPhysicalNetworkAdapter <Boolean>]
[-IsUsedForHostManagement <Boolean>]
[-VMMServer <ServerConnection>]
[-Name <String>]
[-Description <String>]
[-RemoveVMNetwork]
[-RemoveVMSubnet]
[-RemovePortClassification]
[-RemoveIPv4AddressPool]
[-RemoveIPv6AddressPool]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
Set-SCLogicalSwitchVirtualNetworkAdapter Cmdlet 會認可對已新增至上行通訊埠設定檔的現有虛擬網路介面卡所做的變更,作為邏輯交換器定義的一部分。
範例
範例 1:重新命名邏輯交換器虛擬網路介面卡
PS C:\> $HostVNic= Get-SCLogicalSwitchVirtualNetworkAdapter -Name "LogSw01_hostMgmt"
PS C:\> Set-SCLogicalSwitchVirtualNetworkAdapter -LogicalSwitchVirtualNetworkAdapter $HostVNic -Name "LogSw01_cluster"
第一個命令會使用 Get-SCLogicalSwitchVirtualNetworkAdapter Cmdlet 取得邏輯交換器虛擬網路介面卡,然後將它儲存在$HostVNic變數中。
第二個命令會重新命名$HostVNic中的配接器。
參數
-Description
指定虛擬網路介面卡的描述。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EthernetAddressType
指定乙太網路位址類型。 此參數可接受的值為:
- 動態
- 靜態
Type: | EthernetAddressType |
Accepted values: | Dynamic, Static |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InheritsAddressFromPhysicalNetworkAdapter
指出網路介面卡是否從實體網路介面卡繼承其位址。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv4AddressPool
指定包含 IPv4 位址的靜態位址集區。
Type: | StaticIPAddressPool |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv4AddressType
指定 IPv4 網址類別型。 此參數可接受的值為:
- 動態
- 靜態
Type: | EthernetAddressType |
Accepted values: | Dynamic, Static |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv6AddressPool
指定包含 IPv6 位址的靜態位址集區。
Type: | StaticIPAddressPool |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IPv6AddressType
指定 IPv6 網址類別型。 此參數可接受的值為:
- 動態
- 靜態
Type: | EthernetAddressType |
Accepted values: | Dynamic, Static |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsUsedForHostManagement
指出虛擬網路介面卡是否用於主機管理。
Type: | Boolean |
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 |
-LogicalSwitchVirtualNetworkAdapter
指定邏輯交換器虛擬網路介面卡物件。
Type: | LogicalSwitchVirtualNetworkAdapter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
指定網路介面卡的名稱。
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: | True |
Accept wildcard characters: | False |
-PROTipID
指定觸發此動作 (PRO 提示) 效能和資源優化提示的識別碼。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveIPv4AddressPool
表示此 Cmdlet 會移除 IPv4 位址集區。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveIPv6AddressPool
表示此 Cmdlet 會移除 IPv6 位址集區。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemovePortClassification
表示此 Cmdlet 會移除埠分類。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveVMNetwork
表示此 Cmdlet 會移除虛擬機器網路。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveVMSubnet
指出此 Cmdlet 會移除虛擬機器子網。
Type: | SwitchParameter |
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 |
-VLanEnabled
指出是否要啟用虛擬 LAN (VLAN) ,以供 Hyper-V 或 Citrix XenServer 主機上的虛擬機器使用。
- 單一 VLAN 的範例格式:
-VLANEnabled -VLANMode "Access" -VLANID 35
- 多個 VLAN 的範例格式:
-VLANEnabled -VLANMode "Trunk" -VLANTrunkID 1,2,100,200,1124
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VLanID
將 1-4094 範圍內的數值識別碼指派給虛擬機器上的虛擬網路介面卡,或指派給虛擬機器主機上的實體網路介面卡。
在 VLan 模式為 Access 時,在外部系結的實體網路介面卡上設定 Hyper-V、VMware ESX 或 Citrix XenServer 主機上的 VLanID。
在系結至主機上實體網路介面卡的虛擬機器虛擬網路介面卡上設定 VLanID,或系結至主機上的內部虛擬網路。
範例格式: -VLanEnabled -VLanMode "Access" -VLANID 35
Type: | UInt16 |
Position: | Named |
Default value: | None |
Required: | False |
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 網路物件。
Type: | VMNetwork |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMSubnet
指定虛擬機器子網物件。
若要取得 VMSubnet 物件,請使用 Get-SCVMSubnet Cmdlet。
Type: | VMSubnet |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |