VMware Cloud Community
CloudAutoCraft
Enthusiast
Enthusiast

PowerShell-driven vRA properties

I have the need to populate vRA (6.1) custom property attributes with some rather lengthy lists of Dynamic values.  I'm at a large enterprise with 5 vCenters, lots of vSphere Portgroups, and lots of Enterprise Applications.  Examples of the custom properties I need to populate are Network Selection (port group), and "Select from a list of enterprise applications" that your new VM is related to, so it can be tagged properly in the CMDB (ServiceNow). 


I’ve been exploring how to do this programmatically, and I keep stubbing my toe.  I found this blog post from oKushmarohttp://elasticskies.com/dynamically-assigning-property-dictionary-values/

This is pretty much *exactly* what I was hoping I could do with PortGroups, and it could be extrapolated to do the same thing with the ServiceNow application list (we’d pull the data from a CSV dump, not from vCenter via PowerCLI).  However, I can’t get the PowerShell module in that blog article to work properly.  I’m guessing that it’s coded to only work with vCAC 5.2, even though he says in a blog comment that it will work with 6.x if you point it at the IaaS Model Manager – that doesn't work for me (I get "Bad Request" errors).  I'm hoping that someone out here is familiar with this and has an idea on how to get it to work? 

Furthermore, in our Property Dictionary, I see Control Types of “ButtonReturnsTextFromPowerShell,”  “DropDownListFromPowerShell,” and “ListBoxPickerFromPowerShell”.  See screenshot below.  I can’t find documentation on these Control Types anywhere and I hope someone out here can share some helpful pointers? 

PropControlType-PS.png

Thanks in advance!

0 Kudos
0 Replies