Open vMarkusK opened 6 years ago
Possible Solution:
if ((Get-Module -Name VMware.VimAutomation.Cloud).Version.Major -eq "6") { $vcloud = $global:DefaultCIServers[0].ExtensionData $orgAdminRole = $vcloud.RoleReferences.RoleReference | Where-Object {$_.Name -eq "Organization Administrator"}
}
elseif ((Get-Module -Name VMware.VimAutomation.Cloud).Version.Major -ge "11") {
$orgAdminRole = $OrgED.RoleReferences.RoleReference | Where-Object {$_.Name -eq "Organization Administrator"}
}
$vcloud.RoleReferences.RoleReference
only returns System Roles and no Org Roles.