List all the VMs in a VMware Datastore

If you ever have to do backend maintenenance on the disks hosting your VMware datastores, then you need to know what systems are on them (in case you have to move or recover them). A quick 1 liner in Powershell will list this out for you:
get-vm -datastore <datstore name>

If you have multiple datastores that are named similarly, you can use the “*” character as a wildcard in the datastore name

Comments