Automation

 View Only
  • 1.  List of VM disk type

    Posted Mar 27, 2013 06:22 AM

    Hi

    Is there a way to list all the vmdks with their disk type?

    I already have the command to show all the thin allocated disks:

    Get-VM | where {($_ | Get-HardDisk | %{$_.StorageFormat}) -contains "Thin"} | select Name

    Thanks for ur help.



  • 2.  RE: List of VM disk type
    Best Answer

    Posted Mar 27, 2013 06:33 AM

    You mean something like this ?

    Get-VM | Get-Harddisk |
    Select @{N="VM";E={$_.Parent.Name}},Name,StorageFormat,DiskType,
     
    @{N="DiskType2";E={$_.ExtensionData.Backing.GetType().Name}}