VMware Cloud Community
rvp1001
Contributor
Contributor

Quick script to help List of datastores mounted to an esxi host

I want to now if there a quick way to list of datastore mount to existing ESXI host;  Having a script export list of datastore mount to existing host would be great for new builds to have all information and port over the mount data script.

Any suggestion what parameters to us?

Powershell CLI cmdlet commands.

Get-VMHost -Name VMHost1, VMHost2 | Get-Datastore

Script example:

Get-Datastore -VMHost <ESXI host target FQDN or IP" -LunType disk | select lunDatastoreName, CanonicalName, CapacityMB | sort -Property lunDatastoreName | Export-csv C:\DatastoreInfo.csv?

Tags (2)
0 Kudos
1 Reply
LucD
Leadership
Leadership

What type of datastores do you want to list, all types ?

Since you mention mounts, I'm not sure of you intend all types or only NFS mounts.


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

0 Kudos