This script for powercli to get a vm's used disk space
get-vm winVM01| Select Name,UsedSpaceGB
-thx LucD
View a vm's , cluster, current esx host, and datastore:
Get-VM | Select Name, @{N="Cluster";E={Get-Cluster -VM $_}}, `
@{N="ESX Host";E={Get-VMHost -VM $_}}, `
@{N="Datastore";E={Get-Datastore -VM $_}}
@{N="ESX Host";E={Get-VMHost -VM $_}}, `
@{N="Datastore";E={Get-Datastore -VM $_}}
Pasted from <http://ict-freak.nl/2009/11/17/powercli-one-liner-to-get-vms-clusters-esx-hosts-and-datastores/>
To export to a excel spreadsheet use the powershell command
Export-csv c:\temp\nameofexcelfile.csv
Example:
get-vm winVM01| Select Name,UsedSpaceGB | export-csv c:\temp\file22.csv
0 comments:
Post a Comment