I always forget the syntax to this, so here you go.
$outputs = @();
$output = New-Object -TypeName PSObject -Property @{
Name = $vm.Name
Path = $($disk.Path)
Capacity = $($disk.Capacity/1GB)
FreeSpace = $($disk.FreeSpace/1GB)
Storage = $($ds -join " ")
}
$outputs += $output
Leave a comment