Finding Mounted Media on VMware VMs

Finding Mounted Media on VMware VMs

Finding Mounted Media on VMware VMs

$datacenters=get-datacenter

foreach ($dc in $datacenters)

{

$vms = get-datacenter -name $dc | get-vm

foreach($vm in $vms)

{

if(get-cddrive -VM $vm | where {$_.HOSTPATH -ne $null})

{

write-host $vm.name

write-host $vm.vmhost

write-host $dc.Name

write-host „”

}

}

}

Comments are closed.