New-SCLogicalSwitch
创建逻辑交换机。
语法
New-SCLogicalSwitch
-Name <String>
[-VirtualSwitchExtensions <VirtualSwitchExtension[]>]
[-Description <String>]
[-EnableSriov <Boolean>]
[-SwitchUplinkMode <SwitchUplinkMode>]
[-MinimumBandwidthMode <BandwidthMode>]
[-VMMServer <ServerConnection>]
[-EnablePacketDirect <Boolean>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
说明
New-SCLogicalSwitch cmdlet 创建逻辑交换机对象。
示例
示例 1:创建逻辑交换机
PS C:\> $VSwitchExt = Get-SCVirtualSwitchExtension -Name "VirtualSwitchExtension01"
PS C:\> New-SCLogicalSwitch -Name "LogicalSwitch01" -VirtualSwitchExtensions $VSwitchExt -MinimumBandwidthMode Default
第一个命令获取名为 VirtualSwitchExtension01 的虚拟交换机扩展对象,并将对象存储在$VSwitchExt变量中。
第二个命令使用 VirtualSwitchExtension01 创建名为 LogicalSwitch01 的逻辑交换机。
参数
-Description
指定逻辑交换机的说明。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnablePacketDirect
在交换机上启用数据包直通。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableSriov
指示是否启用了单根 I/O 虚拟化 (SR-IOV) 。
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 |
-MinimumBandwidthMode
指定逻辑交换机的最小带宽模式。 此参数的可接受值为:
- 默认
- 重量
- 绝对
- 无
Type: | BandwidthMode |
Accepted values: | Default, Weight, Absolute, None |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 Virtual Machine Manager (VMM) 对象的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
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 |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SwitchUplinkMode
指定开关上行模式对象。
Type: | SwitchUplinkMode |
Accepted values: | NoTeam, Team, EmbeddedTeam |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualSwitchExtensions
指定虚拟交换机扩展对象的数组。
若要获取虚拟交换机扩展对象,请使用 Get-SCVirtualSwitchExtension cmdlet。
Type: | VirtualSwitchExtension[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |