VMware Cloud Community
kyleroberson
Contributor
Contributor

Getting PowerShell Output into Dropdown

Hi,

So first of all thank you to all of you guys. I'm a couple of months into my Orchestrator journey and this forum has been immensely helpful.

I'm trying to accomplish the following. Any direction would be greatly appreciated.

1. Invoke a PowerShell script via a PowerShellHost - my script requires an external module
2. Parse the result of the output into an array
3. Populate a dropdown with the results

In plainer english:

1. Run a script to pull a list of servers
2. Clean up the output, get it into an array
3. Present it to the user to select a server from a list
4. Get their selection and run additional actions on the chosen server

I've been working with the Predefined list of elements. I can link an action to it and have that be content of the dropdown. I'm guessing something similar will need to happen with PowerShell.

Thanks!
Kyle

0 Kudos
3 Replies
aenagy
Hot Shot
Hot Shot

kyleroberson​:

With regards to populating the drop-down in vRA, this might help:

http://https://blogs.vmware.com/management/2017/02/how-to-use-dynamic-property-definitions-in-vra-7-...

I would suggest breaking up your question into smaller pieces.

0 Kudos
vklinden
VMware Employee
VMware Employee

Did you get this figured out? If not, let me know and I'll see if I can help explain it easier. 
0 Kudos
kyleroberson
Contributor
Contributor

Hey! Sorry I missed the reply. Here is where I ended up with this.

https://imgur.com/gallery/rqdRkwT

It seems like it is more complicated than it needs to be. If there is a better way to accomplish this please let me know. The only way I could sort out how to get this going was getting it into an Action and then using the Predefined list of elements to populate it. The scripting is me piecing together a few people's code. If there's an easier way to accomplish that I am all ears.

0 Kudos