PowerCLI

 View Only
  • 1.  change independent to depend disk

    Posted May 23, 2023 03:43 PM

    Hi gurus 

     

    can I change the independent disk to the dependent disk using powercli ?

     

    Thanks a bunch



  • 2.  RE: change independent to depend disk

    Posted May 23, 2023 04:30 PM

    I assume that means the persistence of the HD?
    If the VM is powered off, you could do

    Get-VM |
    Where{$_.PowerState -eq 'PoweredOff'} |
    Get-HardDisk |
    Where {$_.Persistence -eq 'NonPersistent'}|
    Set-HardDisk -Persistence Persistent -Confirm:$false