< Back
Set-SecurityPolicy
Post
NAME Set-SecurityPolicy
SYNOPSIS
This cmdlet modifies the security policy for virtual port groups or the default port security policy for virtual
switches.
SYNTAX
Set-SecurityPolicy [-VirtualPortGroupPolicy] <VirtualPortgroupSecurityPolicy[]> [-AllowPromiscuous <Boolean>]
[-AllowPromiscuousInherited <Boolean>] [-ForgedTransmits <Boolean>] [-ForgedTransmitsInherited <Boolean>]
[-MacChanges <Boolean>] [-MacChangesInherited <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-SecurityPolicy [-VirtualSwitchPolicy] <VirtualSwitchSecurityPolicy[]> [-AllowPromiscuous <Boolean>]
[-ForgedTransmits <Boolean>] [-MacChanges <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet modifies the security policy for virtual port groups or the default port security policy for virtual
switches. Specifying a parameter automatically changes the parameter's Inherited setting to 'false'. Specifying
the parameter's Inherited setting as 'true' automatically applies the switch level security policy to the
parameter.
PARAMETERS
-AllowPromiscuous <Boolean>
Specifies whether promiscuous mode is enabled for the corresponding virtual port group or switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AllowPromiscuousInherited <Boolean>
Specifies whether the AllowPromiscuous setting is inherited from the parent virtual switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ForgedTransmits <Boolean>
Specifies whether forged transmits are enabled for the corresponding virtual port group or switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ForgedTransmitsInherited <Boolean>
Specifies whether the ForgedTransmits setting is inherited from the parent virtual switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MacChanges <Boolean>
Specifies whether MAC address changes are enabled for the corresponding virtual port group or switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MacChangesInherited <Boolean>
Specifies whether the MacChanges setting is inherited from the parent virtual switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-VirtualPortGroupPolicy <VirtualPortgroupSecurityPolicy[]>
Specifies the virtual port group security policy that you want to configure.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-VirtualSwitchPolicy <VirtualSwitchSecurityPolicy[]>
Specifies the virtual switch security policy that you want to configure.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? 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.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
The modified VirtualSwitchSecurityPolicy or VirtualPortgroupSecurityPolicy objects
NOTES
-------------------------- Example 1 --------------------------
Get-VirtualSwitch -Name "MyVirtualSwitch" | Get-SecurityPolicy | Set-SecurityPolicy -MacChanges $false
Retrieves a virtual switch named "MyVirtualSwitch" and updates its security policy to forbid MAC address changes.
-------------------------- Example 2 --------------------------
Get-VirtualPortgroup -Name "MyVirtualPortGroup" | Get-SecurityPolicy | Set-SecurityPolicy
-ForgedTransmitsInherited $true
Retrieves a virtual port group named "MyVirtualPortGroup" and updates the security policy to inherit the setting
value for controlling outbound frames filtering by MAC address from its parent.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... olicy.html
Get-SecurityPolicy
SYNOPSIS
This cmdlet modifies the security policy for virtual port groups or the default port security policy for virtual
switches.
SYNTAX
Set-SecurityPolicy [-VirtualPortGroupPolicy] <VirtualPortgroupSecurityPolicy[]> [-AllowPromiscuous <Boolean>]
[-AllowPromiscuousInherited <Boolean>] [-ForgedTransmits <Boolean>] [-ForgedTransmitsInherited <Boolean>]
[-MacChanges <Boolean>] [-MacChangesInherited <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-SecurityPolicy [-VirtualSwitchPolicy] <VirtualSwitchSecurityPolicy[]> [-AllowPromiscuous <Boolean>]
[-ForgedTransmits <Boolean>] [-MacChanges <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
This cmdlet modifies the security policy for virtual port groups or the default port security policy for virtual
switches. Specifying a parameter automatically changes the parameter's Inherited setting to 'false'. Specifying
the parameter's Inherited setting as 'true' automatically applies the switch level security policy to the
parameter.
PARAMETERS
-AllowPromiscuous <Boolean>
Specifies whether promiscuous mode is enabled for the corresponding virtual port group or switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AllowPromiscuousInherited <Boolean>
Specifies whether the AllowPromiscuous setting is inherited from the parent virtual switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ForgedTransmits <Boolean>
Specifies whether forged transmits are enabled for the corresponding virtual port group or switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ForgedTransmitsInherited <Boolean>
Specifies whether the ForgedTransmits setting is inherited from the parent virtual switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MacChanges <Boolean>
Specifies whether MAC address changes are enabled for the corresponding virtual port group or switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MacChangesInherited <Boolean>
Specifies whether the MacChanges setting is inherited from the parent virtual switch.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-VirtualPortGroupPolicy <VirtualPortgroupSecurityPolicy[]>
Specifies the virtual port group security policy that you want to configure.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-VirtualSwitchPolicy <VirtualSwitchSecurityPolicy[]>
Specifies the virtual switch security policy that you want to configure.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? 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.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
The modified VirtualSwitchSecurityPolicy or VirtualPortgroupSecurityPolicy objects
NOTES
-------------------------- Example 1 --------------------------
Get-VirtualSwitch -Name "MyVirtualSwitch" | Get-SecurityPolicy | Set-SecurityPolicy -MacChanges $false
Retrieves a virtual switch named "MyVirtualSwitch" and updates its security policy to forbid MAC address changes.
-------------------------- Example 2 --------------------------
Get-VirtualPortgroup -Name "MyVirtualPortGroup" | Get-SecurityPolicy | Set-SecurityPolicy
-ForgedTransmitsInherited $true
Retrieves a virtual port group named "MyVirtualPortGroup" and updates the security policy to inherit the setting
value for controlling outbound frames filtering by MAC address from its parent.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... olicy.html
Get-SecurityPolicy