Syntax
Set-VDTrafficShapingPolicy [-Policy] <TrafficShapingPolicy[]> [-AverageBandwidth <Int64>] [-AverageBandwidthInherited <Boolean>] [-BurstSize <Int64>] [-BurstSizeInherited <Boolean>] [-Enabled <Boolean>] [-EnabledInherited <Boolean>] [-PeakBandwidth <Int64>] [-PeakBandwidthInherited <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet modifies the traffic shaping policy for distributed ports or the default port policy at port group or switch level (depending on the input policy).Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Policy | TrafficShapingPolicy[] | Specifies the traffic shaping policy that you want to configure. | true | True (ByValue) | |
AverageBandwidth | Int64 | Specifies the average bandwidth of the traffic shaping policy for the corresponding distributed port, port group, or switch. The value is in bits per second. | false | False | |
AverageBandwidthInherited | Boolean | Specifies whether the AverageBandwidth setting is inherited from a parent object, such as a distributed port group or switch. | false | False | |
BurstSize | Int64 | Specifies the burst size of the traffic shaping policy for the corresponding distributed port, port group, or switch. The value is in bits per second. | false | False | |
BurstSizeInherited | Boolean | Specifies whether the BurstSize setting is inherited from a parent object, such as a distributed port group or switch. | false | False | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | False | |
Enabled | Boolean | Specifies whether traffic shaping is enabled for the corresponding distributed port, port group, or switch. | false | False | |
EnabledInherited | Boolean | Specifies whether the Enabled setting is inherited from a parent object, such as a distributed port group or switch. | false | False | |
PeakBandwidth | Int64 | Specifies the peak bandwidth of the traffic shaping policy for the corresponding distributed port, port group, or switch. The value is in bits per second. | false | False | |
PeakBandwidthInherited | Boolean | Specifies whether the PeakBandwidth setting is inherited from a parent object, such as a distributed port group or switch. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
The modified TrafficShapingPolicy objectsNotes
Examples
-------------------------- Example 1 --------------------------
Get-VDSwitch "MyVDSwitch" | Get-VDPortgroup "MyVDPortgroup" | Get-VDPort -Key 4| Get-VDTrafficShapingPolicy -Direction In | Set-VDTrafficShapingPolicy -Enabled $true -AverageBandwidth 100000
Enables traffic shaping for a specific port in a distributed port group named "MyVDPortgroup" and updates the average bandwidth settings in their traffic shaping policies.
-------------------------- Example 2 --------------------------
Get-VDPortgroup "MyVDPortgroup" | Get-VDTrafficShapingPolicy | Set-VDTrafficShapingPolicy -BurstSizeInherited
Retrieves a distributed port group named "MyVDPortgroup" and updates its traffic shaping policy by inheriting the burst size from its corresponding parent.