Hi
I searched a lot about to set network security of "AllowPromiscuous","MacChanges" and "ForgedTransmits",but this still a problem to me.
Can you help me?
Thanks in advance!
Have a look at the thread called Script to Configure Security on vSwitch error, in there is a script to configure those settings for a vSwitch.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Have a look at the thread called Script to Configure Security on vSwitch error, in there is a script to configure those settings for a vSwitch.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sorry ,but I still have a problem with Set security for special port group...
I know below method :
-----------------------------------------------------------------------------------------------------------------
You can test for a specific portgroup and only do the change for that portgroup.
Something like this
$tgtPG = "MyPG"
foreach ($vh01 in (Get-View -ViewType HostSystem)){ Write $vh01.Name $NetworkSystem = Get-View $vh01.ConfigManager.NetworkSystem foreach ($pg in $NetworkSystem.Networkconfig.PortGroup){ if($pg.Spec.Name -eq $tgtPG){ $pgspec = $pg.spec $pgspec.policy.security.allowPromiscuous=$false
$pgspec.policy.security.forgedTransmits=$false
$pgspec.policy.security.macChanges=$false
$pgspec.policy.nicteaming.policy="loadbalance_srcid"
$pgspec.policy.nicteaming.notifySwitches=$true
$NetworkSystem.UpdatePortgroup($pgspec.name,$pgspec) } } }
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference