PowerCLI Reference

Set-VDBlockedPolicy

Synopsis

This cmdlet modifies the blocking policy for distributed ports.

Syntax

Set-VDBlockedPolicy [-Policy] <BlockedPolicy[]> [-Blocked <Boolean>] [-BlockedInherited <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Online Version
Get-VDBlockedPolicy

Detailed Description

This cmdlet modifies the blocking policy for distributed ports at switch, port group, or port level (depending on the input policy).

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
PolicyBlockedPolicy[]Specifies the blocking policy that you want to configure.trueTrue (ByValue)
BlockedBooleanSpecifies whether packet forwarding is stopped for the corresponding distributed port, port group, or switch.falseFalse
BlockedInheritedBooleanSpecifies whether the Blocked setting is inherited from a parent object, such as a distributed port group or switch.falseFalse
ConfirmSwitchParameterIf 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.falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

The modified BlockedPolicy objects

Notes

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.


Copyright © VMware, Inc. All rights reserved.