Anyone know if getting or setting custom firewall rules is available via PowerCLI yet?
PowercLI has four cmdlets for working with firewall rules:
Get-VMHostFirewallDefaultPolicy, Get-VMHostFirewallException, Set-VMHostFirewallDefaultPolicy and Set-VMHostFirewallException
I hope this is what you need.
Regards, Robert
Yea, I knew about those, but I don't think you can get and set "custom" rules with those cmdlets.
Thanks for responding.
You can use the SDK to do more with Firewall rules. E.g. to get the ruleset for host ESX1 you can do:
$VMHost = Get-VMHost ESX1 $FirewallSystem = Get-View $VMHost.ExtensionData.ConfigManager.FirewallSystem $FirewallSystem.FirewallInfo.Ruleset
I hope this gives you an idea where to look.
Didn't see the custom rules, but that was helpful for another task