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>] [-Confirm] [-WhatIf] [<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.