I've been trying to get this to work for a while, and this script and others have really helped and I now have something working. There is a difference in that I'm running this into the API provided by our cloud provider, so using PowerCLI for Tenants. However, it works, except if I try and import more than 315 rules, I get the below error:
Exception calling "ConfigureServices" with "1" argument(s): "The server
returned 'Bad Request' with the status code 400 - BadRequest."
At add-firewall-rules-from-CSV-v4.ps1:52 char:1
+ $vse.ConfigureServices($fws)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : CloudException
From everything I've seen on this, the only way to add rules is to import the existing ones from CSV and add the extra ones you want after it, meaning if you have more than 315 rules on the vShield, you can't automate this. Has anyone else had the same issue, and did you find any way round it?
I have a current requirement where the ruleset will be about 500+, and also changing a fair amount, and I can't stand the prospect of having to manually update 200 odd rules via the GUI!
Many thanks!
Antony