Hi Luc,
Get-VMHostNetworkAdapter -VMHost $esxi -VMKernel|?{$_.
while typing above i was expecting ManagementTrafficEnabled as one of the listed properties but i did not find that .not sure if its a bug or someother thing but it is not the exptected
response .i need to write manually ...colud you suggest something on this
Get-VMHostNetworkAdapter -VMHost $esxi -VMKernel|?{$_.ManagementTrafficEnabled -eq "true"}
I'm afraid that is working as designed.
The Get-VMHostNetworkAdapter cmdlet is written to return a HostVirtualNic object (see the Output section when you do Get-Help -Name Get-VMHostNetworkAdapter -Full).
In this case, Intellisense uses that Output object to determine which properties are present.
Unfortunately, the ManagementTrafficEnabled property is not present on the HostVirtualNic object.
That property and others are present on two types (HostVMKernelVirtualNic, HostConsoleVirtualNic) that extend the HostVirtualNic object.
But Intellisense doesn't know about that, it only uses the type of object defined on Output.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
right now i a able to find that property to get the desired output .i am working on the logic to extend the previous script.
thanks for your support .