Syntax
Set-VDSecurityPolicy [-Policy] <SecurityPolicy[]> [-AllowPromiscuous <Boolean>] [-AllowPromiscuousInherited <Boolean>] [-ForgedTransmits <Boolean>] [-ForgedTransmitsInherited <Boolean>] [-MacChanges <Boolean>] [-MacChangesInherited <Boolean>] [-WhatIf] [-Confirm] [<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.