1 Reply Latest reply on Apr 18, 2013 11:11 AM by SteveR77

    PowerCli Newbie

    SteveR77 Novice

      I just had a question on the enumeration of Get-Harddisk.


      I have the following in my script $VMInfo.HardDisks = Get-HardDisk -VM $VM if my understanding is correct this will only return the first hard disk or

      System.Object[] as the value for the hard disk associated with the VM.


      My question is there a way to get the enumeration automatically for the number of hard disks or do I need to set up a loop and build the string so I can get


      Hard Disk 1 Hard Disk 2 Hard Disk 3, etc.  returned for the number of actual drives assoicated with the VM in question.



      Thanks in advanced for your assistance.