1 Reply Latest reply on Mar 9, 2016 5:17 PM by Jon Waite

    VCloud Director - Cannot create a Org Network with PowerCLI

    fperalta999 Novice

      I cannot create a Org Network with Powercli if i'm a Org Administrator (I can create org networks from UI), but I can create org networks if i'm logged with a vcloud administrator user.


      Do you know if there is an option to create org vdc networks with powercli with an org administrator user ?

        • 1. Re: VCloud Director - Cannot create a Org Network with PowerCLI
          Jon Waite Enthusiast

          As far as I can work out this isn't possible as an 'Organizational Administrator' user via PowerCLI (yes, even though they can do it in the GUI). This appears to be because to create a new VdcNetwork you need to call the 'CreateNetwork' method on the OrgVDC object view, but this method isn't exposed in PowerCLI to non-system (global) administrators.


          e.g. If as a tenant organization administrator user I do:

          $myVdc = Get-OrgVdc -name 'myvdc'

          $myVdcView = $myVdc | Get-CIView

          The returned object type of $myVdcView is 'VMware.VimAutomation.Cloud.Views.Vdc' which doesn't include/support the 'CreateNetwork' method.


          If however I do as a 'system' level administrator:

          $myVdc = Get-Org -Name 'tenantorg' | Get-OrgVdc -name 'myvdc'

          $myVdcView = $myVdc | Get-CIView

          This returns an object type of $myVdcView in 'VMware.VimAutomation.Cloud.Views.AdminVdc' which does include the 'CreateNetwork' method.


          Would love to know if anyone has found a PowerCLI workaround for this that doesn't involve hitting the vCD REST API directly.