Set-SCLogicalSwitch

Updates the properties of a logical switch.

Syntax

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

Description

The Set-SCLogicalSwitch cmdlet updates the properties of a logical switch.

Examples

Example 1: Change the minimum bandwidth mode for a logical switch

PS C:\> Get-SCLogicalSwitch -Name "LogicalSwitch01" | Set-SCLogicalSwitch -MinimumBandwidthMode "Weight"

This command gets the logical switch object named LogicalSwitch01 and uses the pipeline operator to pass the object to Set-SCLogicalSwitch, which changes the minimum bandwitdth mode for logical switch object to Weight.

Example 2: Remove all virtual switch extensions from a logical switch

PS C:\> Get-SCLogicalSwitch -Name "LogicalSwitch01" | Set-SCLogicalSwitch -RemoveAllExtensions

This command gets the logical switch object named LogicalSwitch01 and uses the pipeline operator to pass the object to Set-SCLogicalSwitch, which removes all virtual switch extensions from the logical switch object.

Parameters

-Description

Specifies a description for the specified object.

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

Specifies whether the cmdlet 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
-LogicalSwitch

Specifies a logical switch object.

Type:LogicalSwitch
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
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:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization (PRO) tip that triggered this action. This allows for auditing of PRO tips.

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

Indicates that all virtual switch extensions are removed from the logical switch.

Type:SwitchParameter
Required:True
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