In the following script, the outputs are displayed as two separate tables (each with two columns). How can I display both tables in a table with three columns?
# Create a hash table for File QTY
$Qty = @{}
# Create a hash table for file size
$Size = @{}
# Import all files into one $Files
$Files = Get-ChildItem 'D:\' -Filter *.* -Recurse -File
# Create a loop to check $file in $Files
foreach ($file in $Files) {
# Count files based on Extension
$Qty[$file.Extension] += 1
# Summarize file sizes based on their format
$Size[$file.Extension] += $file.Length / 1GB
}
# Show File QTY table
$Qty
# Show file size table
$Size
Like this:
Type Size Qyt
----- ----- -----
.jpg 10 GB 10000
.png 30 GB 30000
.tif 40 GB 40000