PowerCLI – ITrepo Consulting http://itrepo.com Thu, 16 May 2019 20:05:26 +0000 en-US hourly 1 https://wordpress.org/?v=5.0.7 Vmware PowerCLI finding VM and Datastore http://itrepo.com/vmware-powercli-finding-vm-and-datastore/ Fri, 15 Mar 2019 22:42:21 +0000 http://itrepo.com/?p=484 If you are looking for a VM datastore with Vmware PowerCLI below is a very usefull code to check : This is going to show you all the VMs and their datastore , but you can also put name of a VM in front of get-vm command.

The post Vmware PowerCLI finding VM and Datastore appeared first on ITrepo Consulting.

]]>
If you are looking for a VM datastore with Vmware PowerCLI below is a very usefull code to check :

get-vm | select name , @{N="Datastore";E={[string]::Join(',',(Get-Datastore -Id $_.DatastoreIdList | Select -ExpandProperty Name))}}

This is going to show you all the VMs and their datastore , but you can also put name of a VM in front of get-vm command.

The post Vmware PowerCLI finding VM and Datastore appeared first on ITrepo Consulting.

]]>