1 person found this helpful
VcHostFirewallRuleDirection is not a normal scripting object but an enumeration, so you should not try to initialize it using new, but instead directly access the enumeration value(s).
Something like the following should work:
var firewallRuleDirectionInbound = VcHostFirewallRuleDirection.inbound; var firewallRuleDirectionOutbound = VcHostFirewallRuleDirection.outbound;
aaahhhh ok I see the difference now. Thanks again sir!
As a follow up, now that I have this new VcHostFirewallRule object array where do I apply (Vc:HostSystem.configManager?) & method (VcHostFirewallRuleset?) to add the new rule?
I have to create a bunch of rules for the ESXi hosts. Could not see any examples. Could you give some examples here on how to create new rules? I am able to see the list of rules those are present but not sure how to create new ones and apply them. Here some example rules I am looking to create
Allow - SSH Server - <IPs, and Network Addresses>
Deny - SSH client - <Any>
Ilian is not a sir