Syntax
Set-VDBlockedPolicy [-Policy] <BlockedPolicy[]> [-Blocked <Boolean>] [-BlockedInherited <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet modifies the blocking policy for distributed ports at switch, port group, or port level (depending on the input policy).Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Policy | BlockedPolicy[] | Specifies the blocking policy that you want to configure. | true | true (ByValue) | |
Blocked | Boolean | Specifies whether packet forwarding is stopped for the corresponding distributed port, port group, or switch. | false | false | |
BlockedInherited | Boolean | Specifies whether the Blocked 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 | |
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 BlockedPolicy objectsNotes
Examples
-------------- Example 1 --------------
Get-VDPort -VDSwitch "MyVDSwitch" -ActiveOnly | Get-VDBlockedPolicy | Set-VDBlockedPolicy -Blocked
Retrieves all active distributed ports and updates their blocking policy to stop packet forwarding through them.
-------------- Example 2 --------------
Get-VDportgroup "MyVDPortgroup" | Get-VDPort | Get-VDBlockedPolicy | Set-VDBlockedPolicy -BlockedInherited
Retrieves the specified "MyVDPortgroup" distributed port group and updates the blocking policy of all ports inside the group to inherit the setting for packet forwarding from the one set on the distributed port group level.