1 Reply Latest reply on Dec 15, 2016 2:19 AM by dcouturier

    Remove Storage Profile from vDC

    siemin81 Lurker

      Hello,

       

      How to remove storage profile from Organization vDC in vCloud Director 5.1. To be exact, I want to remove *(Any) profile from all my vdcs. I know how to create it and how to enable / disable it, but I cannot find any info regarding its deletion / removing. Here are some hints on how to remove it via vcloud API, but I need it to be done by PowerCLI: http://pubs.vmware.com/vcd-51/index.jsp?topic=%2Fcom.vmware.vcloud.api.reference.doc_51%2Fdoc%2Ftypes%2FUpdateVdcStorageProfilesType.html

       

      TIA

        • 1. Re: Remove Storage Profile from vDC
          dcouturier Enthusiast

          Hello,

           

          I know this thread is quite old but I have a solution to your issue :

                    $org = get-org -name <Orgname>

                   $orgvdc= $org | get-orgvdc

           

                  # Disable the "* (any)" Profile 

                  $orgvDCAnyProfile = search-cloud -querytype AdminOrgVdcStorageProfile | where {($_.Name -match '\*') -and ($_.VdcName -eq $orgvdc.Name)} | Get-CIView

                  $orgvDCAnyProfile.Enabled = $False 

                  $return = $orgvDCAnyProfile.UpdateServerData() 

           

                  # Remove the "* (any)" profile form the Org vDC completely 

                  $ProfileUpdateParams = new-object VMware.VimAutomation.Cloud.Views.UpdateVdcStorageProfiles 

                  $ProfileUpdateParams.RemoveStorageProfile = $orgvDCAnyProfile.href 

                  $remove = $orgvdc.extensiondata.CreatevDCStorageProfile($ProfileUpdateParams)

           

          Regards