Hi team,
below script to find the security policy on each esxi host in vcenter, i added a filter, where am looking for "Security" in Portgroup Name and then return the output. but the script is not showing cluster name,hostname. only showing portgroup name and security policys
PS C:\> Get-Cluster |Get-VMHost | Get-VirtualPortGroup | Where {$_.Name -match "Load"} | Get-SecurityPolicy
VirtualPortGroup AllowPromiscuous ForgedTransmits MacChanges
---------------- ---------------- --------------- ----------
Subnet-10.x.x.x_Security True True True
Subnet2-10.x.x.x_Security True True True
=====
need help to get output to file, like:
ClusterName ESXiName VirtualPortGroup AllowPromiscuous ForgedTransmits MacChanges
cluster1 esxi01 Subnet-10.x.x.x_Security True False False
cluster1 esxi01 Subnet2-10.x.x.x_Security True False False