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

    vCloud Set-OrgNetwork

    frefal Novice

      Hi,

      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 "10.0.0.5" -SecondaryDns "10.1.0.5"

      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 "10.0.0.5" -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     6.5.1.5... VMware.DeployAutomation             {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}

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

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

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

      Manifest   6.5.1.5... VMware.VimAutomation.Common

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

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

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

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

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

          Hello,

           

          the Get-OrgVdcNetwork Cmdlet itself still works fine.

           

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

           

          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 192.168.66.1   Test Network
          
          
          
          

           

          Best regards,

          Markus