Syntax
Set-VDSecurityPolicy [-Policy] <SecurityPolicy[]> [-AllowPromiscuous <Boolean>] [-AllowPromiscuousInherited <Boolean>] [-ForgedTransmits <Boolean>] [-ForgedTransmitsInherited <Boolean>] [-MacChanges <Boolean>] [-MacChangesInherited <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed 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
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Policy | SecurityPolicy[] | Specifies the security policy that you want to configure. | true | True (ByValue) | |
AllowPromiscuous | Boolean | Specifies whether promiscuous mode is enabled for the corresponding distributed port, port group, or switch. | false | False | |
AllowPromiscuousInherited | Boolean | Specifies whether the AllowPromiscuous 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 | |
ForgedTransmits | Boolean | Specifies whether forged transmits are enabled for the corresponding distributed port, port group, or switch. | false | False | |
ForgedTransmitsInherited | Boolean | Specifies whether the ForgedTransmits setting is inherited from a parent object, such as a distributed port group or switch. | false | False | |
MacChanges | Boolean | Specifies whether MAC address changes are enabled for the corresponding distributed port, port group, or switch. | false | False | |
MacChangesInherited | Boolean | Specifies whether the MacChanges 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 SecurityPolicy objectsNotes
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.