Get VM with stored vmdks path

I would like to know our VM names and vmdk files path. Becouse, the name of VM and folder name of path isn’t same sometimes. This script shows to you this information.

$vms=Get-VM
Get-HardDisk -vm $vms| select parent,filename|Export-Csv -Path c:\tmp\vCenter1VMDKs.txt

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s