I use script below for listing security settings of the Distributed vSwitches
Get-View -ViewType VmwareDistributedVirtualSwitch -Property Name,Config.DefaultPortConfig | `
Select-Object -Property Name,
@{N="Allow Promiscuous";E=
{$_.Config.DefaultPortConfig.SecurityPolicy.AllowPromiscuous.Value}},
@{N="Allow MAC Address Change";E=
{$_.Config.DefaultPortConfig.SecurityPolicy.MacChanges.Value}},
@{N="Allow Forged Transmits";E=
{$_.Config.DefaultPortConfig.SecurityPolicy.ForgedTransmits.Value}}
How can i list security settings of the dvP´s from that distributed switches?
regards
Fred
Nearly the same structure
foreach($dvSw in (Get-View -ViewType VmwareDistributedVirtualSwitch -Property Name,Portgroup)){ Get-View $dvSw.Portgroup | %{ $_ | Select-Object -Property @{N="dvSwitch";E={$dvSw.Name}}, Name, @{N="Allow Promiscuous";E={$_.Config.DefaultPortConfig.SecurityPolicy.AllowPromiscuous.Value}}, @{N="Allow MAC Address Change";E={$_.Config.DefaultPortConfig.SecurityPolicy.MacChanges.Value}}, @{N="Allow Forged Transmits";E={$_.Config.DefaultPortConfig.SecurityPolicy.ForgedTransmits.Value}} } }
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Nearly the same structure
foreach($dvSw in (Get-View -ViewType VmwareDistributedVirtualSwitch -Property Name,Portgroup)){ Get-View $dvSw.Portgroup | %{ $_ | Select-Object -Property @{N="dvSwitch";E={$dvSw.Name}}, Name, @{N="Allow Promiscuous";E={$_.Config.DefaultPortConfig.SecurityPolicy.AllowPromiscuous.Value}}, @{N="Allow MAC Address Change";E={$_.Config.DefaultPortConfig.SecurityPolicy.MacChanges.Value}}, @{N="Allow Forged Transmits";E={$_.Config.DefaultPortConfig.SecurityPolicy.ForgedTransmits.Value}} } }
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Works great!
Thanks again LucD
regards
fred