Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

I'm not sure what the actual question is and why you have an empty foreach loop in that snippet.

All the info is there

Connect-VIServer = "vCenter1","vCenter2","vCenter3","vCenter4"

Get-VMHost | 
Get-VMHostFirewallException | 
Where-Object {$_.Enabled -and $_.ExtensionData.AllowedHosts.AllIP} |
Select @{N='VMHost';E={$_.VMHost.Name}}, 
    Name, Protocols, IncomingPorts, OutgoingPorts, ServiceRunning
    


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference