1 Reply Latest reply on Apr 10, 2018 12:31 PM by vMarkusK1985

    vCloud Set-OrgNetwork

    frefal Enthusiast


      i am experiencing an issue which I find a bit odd and perhaps it is a bug?

      Connected to a vCloud 8.20 instance.


      So get-OrgNetwork is deprecated, but the same error occurs with get-OrgVdcNetwork.


      PS C:\> $network = Get-OrgNetwork -name "test"

      WARNING: The command 'Get-OrgNetwork' is obsolete. Get-OrgNetwork cmdlet is deprecated. Use Get-OrgVdcNetwork cmdlet instead.

      PS C:\>


      PS C:\> Set-OrgNetwork -OrgNetwork $network -PrimaryDns "" -SecondaryDns ""

      Set-OrgNetwork : 24.01.2018 14:31:39    Set-OrgNetwork          Unable to cast object of type 'VMware.VimAutomation.Cloud.Views.OrgVdcNetwork' to type 'VMware.VimAutomation.Cloud.Views.OrgNetwork'.

      At line:1 char:1

      + Set-OrgNetwork -OrgNetwork $network -PrimaryDns "" -Secondary ...

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          + CategoryInfo          : NotSpecified: (:) [Set-OrgNetwork], CIException

          + FullyQualifiedErrorId : CloudImpl_OrganizationNetworkServiceImpl_UpdateOrgNetwork_CIError,VMware.VimAutomation.Cloud.Commands.Cmdlets.SetOrgNetwork



      is get-orgnetwork using get-orgvdcnetwork here behind the scene?


      Any feedback is appreciated !


      PSVersion                      5.1.14393.1944


      ModuleType Version    Name                                ExportedCommands

      ---------- -------    ----                                ----------------

      Binary VMware.DeployAutomation             {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}

      Binary VMware.ImageBuilder                 {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfile...}

      Binary VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}

      Binary VMware.VimAutomation.Cloud          {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}

      Manifest VMware.VimAutomation.Common

      Binary VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}

      Manifest VMware.VimAutomation.Sdk            {Get-InstallPath, Get-PSVersion}

      Binary VMware.VimAutomation.Storage        {Copy-VDisk, Export-SpbmStoragePolicy, Get-NfsUser, Get-SpbmCapability...}

      Binary VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitch...}

        • 1. Re: vCloud Set-OrgNetwork
          vMarkusK1985 Hot Shot



          the Get-OrgVdcNetwork Cmdlet itself still works fine.


          C:\> Get-OrgVdcNetwork -Name Test | Select-Object Name, DefaultGateway, Description
          Name DefaultGateway Description
          ---- -------------- -----------


          But I run into the same Issue with Set-OrgNetwork.


          Are you connected as a OrgAdmin or System Admin?


          Reference Guide for Set-OrgNetwork:

          This cmdlet modifies the configuration of the specified organization network. Note: This cmdlet is only available to Provider Administrators.

          Online Documentation - Cmdlet Reference - VMware {code}


          I Recommend using this alternate way to modify OrgVdcNetworks:

          C:\> $OrgNetView = Get-OrgVdcNetwork -Name Test |  Get-CIView
          C:\> $OrgNetView.Description = "Test Network"
          C:\> $OrgNetView.UpdateServerData()
          C:\> Get-OrgVdcNetwork -Name Test | Select-Object Name, DefaultGateway, Description
          Name DefaultGateway Description
          ---- -------------- -----------
          Test   Test Network


          Best regards,