VMware Cloud Community
sidman_ireland
Contributor
Contributor
Jump to solution

Command to list all .vmdk files attached to a VM

Hi Folks,

I am documenting our infrastructure. I would like a command which will list all vmdk files and the VM they are attached to. I am sure that I did this before but I cannot remember the command. Thanks

in advance.

Paul

0 Kudos
1 Solution

Accepted Solutions
Rubeck
Virtuoso
Virtuoso
Jump to solution

You could use Powershell and do a query towards Virtual Center if available:

A basic example:

Connect-VIserver

Get-vm | select Name, @{Name="VMDK Disks" ;Expression= {$_ | get-harddisk | select Filename}}

/Rubeck

View solution in original post

0 Kudos
3 Replies
Rubeck
Virtuoso
Virtuoso
Jump to solution

You could use Powershell and do a query towards Virtual Center if available:

A basic example:

Connect-VIserver

Get-vm | select Name, @{Name="VMDK Disks" ;Expression= {$_ | get-harddisk | select Filename}}

/Rubeck

0 Kudos
sidman_ireland
Contributor
Contributor
Jump to solution

Thanks

I will try now. Though I am a powershell novice.

Paul

0 Kudos
sidman_ireland
Contributor
Contributor
Jump to solution

Thanks again for your help I have just got my head around powershell. The command is great but truncates the results even when piped to txt file. Any ideas?

Paul

0 Kudos