3 Replies Latest reply on Feb 20, 2019 8:15 AM by LucD

    PowerCli - Remove - Harddisk from backup proxy servers which leads to Disk consolidation issue

    Bunty11 Enthusiast

      i have came up with script to remove hardisk from backup proxy vms


      Get hardisk on  backup proxy server which are in Independetnonpersistent state. and remove them


      $Hd = Get-HardDisk -VM "XXX" -Server 'xxx' | Where { $_.Persistence -eq 'IndependentNonPersistent'}

      $Hd |  Remove-HardDisk -Confirm:$true



      Re: How to find Base/original disk of VM which is running from snapshot?


      I was getting below error earlier when i tried script mentinoed in above post.


      Remove-HardDisk : Cannot bind parameter 'HardDisk'. Cannot convert the "[XXX] XX.XX.XX/XX.XX.XX.vmdk" value of type

      "System.String" to type "VMware.VimAutomation.ViCore.Types.V1.VirtualDevice.HardDisk".




      Please advice if i am correct.