VMware Cloud Community
tdubb123
Expert
Expert

how to find if vmdks are being shared

is it possioble to find if a VM's vmdks are being shared with another VM with powercli?

0 Kudos
1 Reply
LucD
Leadership
Leadership

You can scan all VMs, get their VMDK and check if the same one appears more than once.

A quick way to do that could be

Get-VM | Get-HardDisk |

Group-Object -Property FileName |

where{$_.Count -gt 1} |

Select @{N='VMDK';E={$_.Name}},@{N='VM';E={$_.Group.Parent.Name -join '|'}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos