I recently needed a vRO workflow to get a distributed port group object to perform some work on. I had access to the name of the port group but I couldn’t find a workflow that would allow me to get the port group object by a name without manual intervention. I was writing an automated process so I needed the lookup to run without intervention.
What I wrote does the following:
1) Looks up the portgtoup on a name passed as a string and a DV Switch object.
2) Returns a DV Portgroup as a VC:DistributedVirtualPortgroup object.
3) Errors out if a port group is not found.
Using this workflow, you can easily get a port group from a distributed virtual switch. You can download the workflow here. As always, this post is my own and not endorsed or supported by VMware.