New-SCLogicalSwitch

Creates a logical switch.

Syntax

New-SCLogicalSwitch
   -Name <String>
   [-VirtualSwitchExtensions <VirtualSwitchExtension[]>]
   [-Description <String>]
   [-EnableSriov <Boolean>]
   [-SwitchUplinkMode <SwitchUplinkMode>]
   [-MinimumBandwidthMode <BandwidthMode>]
   [-VMMServer <ServerConnection>]
   [-EnablePacketDirect <Boolean>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnablePacketDirect

Enables Packet Direct on the switch.

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

-EnableSriov

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

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

-JobVariable

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

Type:String
Position:Named
Default value:None
Required:False
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
Accepted values:Default, Weight, Absolute, None
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

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

Type:String
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SwitchUplinkMode

Specifies a switch uplink mode object.

Type:SwitchUplinkMode
Accepted values:NoTeam, Team, EmbeddedTeam
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False