With the PowerCLI 13.* releases the new module VMware.Sdk.vSphere.Appliance.Networking makes this somewhat easier (instead of using the CIS services).
Provided you have a CSV file with the following layout
address,prefix,policy,interface
192.168.10.77,24,ACCEPT,nic0
192.168.100.88,24,IGNORE,nic0
192.168.2.200,16,REJECT,nic0
192.168.1.66,24,RETURN,nic0
you can do something like this
$rules = @()
Import-Csv -Path .\rules.csv -PipelineVariable row |
ForEach-Object -Process {
$rules += Initialize-NetworkingFirewallInboundRule -Address $row.address -Prefix $row.prefix -Policy $row.policy -InterfaceName $row.interface
}
$body = Initialize-NetworkingFirewallInboundSetRequestBody -Rules $rules
Invoke-SetNetworkingFirewallInbound -NetworkingFirewallInboundSetRequestBody $body -WithHttpInfo
With $result.StatusCode -ne 500 you can check if the call succeeded.