When selecting storage during VM creation, we can see if this storage supports Thin Provisioning or not(Supported/Not supported). How can I show it via PowerCli for script perspective?
My command so far, only this column is missing:
Get-Datastore -server xxx -name xxx | Select Name, Datacenter,CapacityGB,FreeSpaceGB,Type,
@{N="Provisioned (GB)"; E={[math]::round(($_.ExtensionData.Summary.Capacity - $_.ExtensionData.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted)/1GB,2) }}
Output:
Name : xxx
Datacenter : xxx
CapacityGB : 4654.75
FreeSpaceGB : 3253.978515625
Provisioned (GB) : 2279.13
Type : VMFS
Bonus question: how can I change the current output for horizontal view(table columns)?
You're looking for the 'PerFileThinProvisioningSupported' property, it's located: $ds.ExtensionData.Capability.PerFileThinProvisioningSupported
Bonus question, pipe what you have to: Format-Table