I want to get providervdc information where my organization was created. Is there anyway to get it?
You need a VDC as a starting point (you can get the VDCs from an org but these can have different provider VDCs).
var host = vdc.getHost();
var providerVdcReference = vdc.toAdminObject().providerVdcReference;
var providerVdc = host.getEntityByReference(VclFinderType.PROVIDER_VDC, providerVdcReference);
I was assuming that you could get providervdc from org name. Is there anyway to get VCenter information from providervdc?
Sorry forgot to say thanks for your response.
No you cannot get provider VDC from org name because your org may have VDC belonging to different provider VDCs.
What vCenter information are you looking for ?
Maybe this post helps you: http://www.virtuallyghetto.com/2012/04/org-vdc-to-vcenter-resource-pool.html
It's about getting vCenter-information(MoRef of the resourcepool) from an org-vdc. But there is a similar way with providerVdcs. You just have to change the query type to QueryResultProviderVdcResourcePoolRelationRecordType. With the MoRef you can connect to your vSphere environment and retrieve the ResourcePool-Object.