PowerCLI Reference

Set-VDSecurityPolicy

Synopsis

This cmdlet modifies the security policy for distributed ports.

Syntax

Set-VDSecurityPolicy [-Policy] <SecurityPolicy[]> [-AllowPromiscuous <Boolean>] [-AllowPromiscuousInherited <Boolean>] [-ForgedTransmits <Boolean>] [-ForgedTransmitsInherited <Boolean>] [-MacChanges <Boolean>] [-MacChangesInherited <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-VDSecurityPolicy

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
PolicySecurityPolicy[]Specifies the security policy that you want to configure.truetrue (ByValue)
AllowPromiscuousBooleanSpecifies whether promiscuous mode is enabled for the corresponding distributed port, port group, or switch.falsefalse
AllowPromiscuousInheritedBooleanSpecifies whether the AllowPromiscuous 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
ForgedTransmitsBooleanSpecifies whether forged transmits are enabled for the corresponding distributed port, port group, or switch.falsefalse
ForgedTransmitsInheritedBooleanSpecifies whether the ForgedTransmits setting is inherited from a parent object, such as a distributed port group or switch.falsefalse
MacChangesBooleanSpecifies whether MAC address changes are enabled for the corresponding distributed port, port group, or switch.falsefalse
MacChangesInheritedBooleanSpecifies whether the MacChanges setting is inherited from a parent object, such as a distributed port group or switch.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 SecurityPolicy objects

Notes

Examples

-------------- Example 1 --------------

Get-VDSwitch "MyVDSwitch" | Get-VDSecurityPolicy | Set-VDSecurityPolicy -MacChanges $true

Retrieves a vSphere distributed switch named "MyVDSwitch" and updates its security policy to allow MAC address changes.

-------------- Example 2 --------------

Get-VDPortgroup "MyVDPortgroup" | Get-VDSecurityPolicy | Set-VDSecurityPolicy -ForgedTransmitsInherited $true

Retrieves a distributed port group named "MyVDPortgroup" and updates the security policy to inherit the setting value for controlling outbound frames filtering by MAC address from its parent.


Copyright © VMware, Inc. All rights reserved.