In my demo vCD environment I often find that after a power-up the Edge Gateways don’t function properly. Options like “Upgrade to Full Configuration” don’t exist, traffic doesn’t flow or rules can’t be changed. A redeploy always fixed it so I started looking for a way to redeploy them automatically when the system started up.

I started with PowerCLI and after figuring out you need to select the vCloud Director plugin during the installation for commands like connect-ciserver to showup I realized it didn’t really address vSheild/VMware vCloud Networking and Security. That led me to Alan Renouf’s VMware vShield PowerShell Module which contains mostly GET commands for vShield but also has an Invoke routine that I played with for awhile before moving on to cURL

cURL ultimatly had what I needed, the final piece coming from a VMware Blog on using cURL with the vShield Rest API.

Step 1: Download cURL for your platform of choice and extract the executable into a suitable directory Step 2: Find the identifier of the Edge Gateway to redeploy. Since I’m resetting the same gateways on a set install I just used the vShield Manager GUI: