New-SCLogicalSwitch

Creates a logical switch.

Syntax

New-SCLogicalSwitch [-Description <String>] [-EnablePacketDirect <Boolean>] [-EnableSriov <Boolean>]
 [-JobVariable <String>] [-MinimumBandwidthMode <BandwidthMode>] -Name <String> [-PROTipID <Guid>]
 [-RunAsynchronously] [-SwitchUplinkMode <SwitchUplinkMode>] [-VMMServer <ServerConnection>]
 [-VirtualSwitchExtensions <VirtualSwitchExtension[]>] [<CommonParameters>]

Description

The New-SCLogicalSwitch cmdlet creates a logical switch object.

Examples

Example 1: Create a logical switch

PS C:\> $VSwitchExt = Get-SCVirtualSwitchExtension -Name "VirtualSwitchExtension01"
PS C:\> New-SCLogicalSwitch -Name "LogicalSwitch01" -VirtualSwitchExtensions $VSwitchExt -MinimumBandwidthMode Default

The first command gets the virtual switch extension object named VirtualSwitchExtension01 and stores the object in the $VSwitchExt variable.

The second command creates a logical switch named LogicalSwitch01 using VirtualSwitchExtension01.

Parameters

-Description

Specifies a description for the logical switch.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnablePacketDirect

Enables Packet Direct on the switch.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableSriov

Indicates whether single-root I/O virtualization (SR-IOV) is enabled.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies a variable in which job progress is tracked and stored.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MinimumBandwidthMode

Specifies the minimum bandwidth mode for the logical switch. The acceptable values for this parameter are:

- Default

  • Weight
  • Absolute
  • None

Type:BandwidthMode
Parameter Sets:Default, Weight, Absolute, None
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a Virtual Machine Manager (VMM) object.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SwitchUplinkMode

Specifies a switch uplink mode object.

Type:SwitchUplinkMode
Parameter Sets:NoTeam, Team, EmbeddedTeam
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VirtualSwitchExtensions

Specifies an array of virtual switch extension objects.

To get a virtual switch extension object, use the Get-SCVirtualSwitchExtension cmdlet.

Type:VirtualSwitchExtension[]
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False