Showing posts with label storage. Show all posts
Showing posts with label storage. Show all posts
Wednesday, April 30, 2014
Monday, September 30, 2013
PowerShell CLI Command to Get Datastore Usage
The below script will run and return all Datastores with Name like EMC (just an example) and then will return the Capacity of the datastore, the FreeSpace and the Provisioned Space
$DS = get-datastore | where { $_.name -like "EMC*"}
Get-Datastore $DS |Select-Object -Property Name,CapacityGB,FreeSpaceGB,@{ Name = "ProvisionedSpaceGB"
Expression = {($_.ExtensionData.Summary.Capacity - $_.Extensiondata.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted)/1GB}
} |fl
$DS = get-datastore | where { $_.name -like "EMC*"}
Get-Datastore $DS |Select-Object -Property Name,CapacityGB,FreeSpaceGB,@{ Name = "ProvisionedSpaceGB"
Expression = {($_.ExtensionData.Summary.Capacity - $_.Extensiondata.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted)/1GB}
} |fl
Subscribe to:
Posts (Atom)