Set-SCLogicalSwitchVirtualNetworkAdapter
将设置中的任何更改提交到连接到逻辑交换机的现有虚拟网络适配器 (VNIC) 。
语法
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>]
说明
Set-SCLogicalSwitchVirtualNetworkAdapter cmdlet 提交对作为逻辑交换机定义的一部分添加到 Uplink 端口配置文件的现有虚拟网络适配器所做的更改。
示例
示例 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 提示) 的性能和资源优化提示的 ID。 此参数允许审核 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
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VLanEnabled
指示是否为 Hyper-V 或 Citrix XenServer 主机上的虚拟机启用虚拟 LAN (VLAN) 。
- 单个 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 |