Archive for March, 2015
List All Disks (VMDKs) In A Virtual Machine (ESXi)
Posted by edwgon in administrator, disks, esxi, filename, http://schemas.google.com/blogger/2008/kind#post, powercli, PowerShell, virtual, virtual machines, vmdk, vmdks, vmware on March 31, 2015
Using VMware PowerCLI, PowerShell, there’s a nifty way to get a list of all VMDKs associated with a virtual machine(s).
Here’s the command:
Get-Vm | Get-Harddisk | Select Parent, StorageFormat, Filename, CapacityGB, Name | Export-Csv -Path C:\SomeFolder\SomeOutputFile.csv –NoTypeInformation
This command lists all VMDKs for all virtual machines in your VMware cluster.
For this sample, I chose to output the following fields:
For this sample, I chose to output the following fields:
Parent, StorageFormat, Filename, CapacityGB and Name
This sample code will provide you something like this:
Recent Comments