Hey Luc,
I see how the $null value is being generated now. I'm trying to bypass the DVUplinks and only display the DvPort Group policies.
I was attempting to use $DvSallowPromSec | where-object {$_.Name -NotLike "*DVUplinks"} so the DVUplinks are not looped through when checking the policy setting, but it appears the $null value is still being seen.
Any suggestions on how to change this bit of code? I tried changing it to a IF ELSE statement, but its not working.
$DvSallowPromSec = $GetDvSSecPol1 | % {Get-View -Id $_} | `
Select Name, `
@{N="AllowPromiscuous";E={$_.Config.DefaultPortConfig.SecurityPolicy.AllowPromiscuous.Value}}
$DvSallowPromiscuous = $DvSallowPromSec | where-object {$_.Name -NotLike "*DVUplinks"}
$DvSallowPromiscuous1 = $DvSallowPromSec | % {$_.AllowPromiscuous}