A while back I was asked if we could automate some areas of vShield, VMware Security suite of products. I was asked to do this for a demo which was to be used at VMworld, having never touched vShield before I was thrown into the world of security at the deep end. The first thing I found on my quest was the vShield API, there is a great document by VMware which explains the vShield proprietary Web-RPC API (Based on Rest API) and all the calls you would ever need to make to work with the vShield products.
Now I had the API details I knew I could easily write some PowerShell code in the form of an advanced function to work with the API, the first piece of code I wrote was a generic function which allowed me to GET, PUT, DELETE and POST to a proprietary Web-RPC based Restful API. I know PowerShell v3 will include cmdlets for this but I didn’t want to wait or add a dependency on something which wasn’t available as yet.
With this completed the rest of the advanced functions were easily created, it was just a case of sending the correct parameter to my function and the correct URL and my results would be returned.
So why would we want to do this ?
Automation is a powerful tool, with automation we can not only make our lives as administrators easier and less cumbersome but also enable products to do things automagically that they never could do before.
I will add more and more posts for this module to show you what I mean but first things first I just wanted to get the module out here and available for feedback and general usage.
Don’t forget my other posts around automating vShield here:
- PowerShell v2
- PowerCLI (Latest Version)
- vShield Module (See Downloads area on this page)
- vShield Manager 5.0
Install and Usage
The below video will take you through the install and give you enough to get started:
If there is anything you have ever wanted to automate with vShield but didn’t know how then please let me know, the cmdlets are easily adjusted.