# List all disks that can be pooled and output in table format (format-table)
Get-PhysicalDisk -CanPool $True | Format-Table -Property FriendlyName, OperationalStatus, Size, MediaType
# Store all physical disks that can be pooled into a variable, $pd
$pd = (Get-PhysicalDisk -CanPool $True | Where-Object -FilterScript {$_.MediaType -NE 'UnSpecified'})
# Create a new Storage Pool using the disks in variable $pd with a name of My Storage Pool
New-StoragePool -PhysicalDisks $pd –StorageSubSystemFriendlyName "Storage Spaces*" -FriendlyName "My Storage Pool"
#View the disks in the Storage Pool just created
Get-StoragePool -FriendlyName "My Storage Pool" | Get-PhysicalDisk | Select-Object -Property FriendlyName, MediaType
# Create two tiers in the Storage Pool created. One for SSD disks and one for HDD disks
$ssd_Tier = New-StorageTier -StoragePoolFriendlyName "My Storage Pool" -FriendlyName SSD_Tier -MediaType SSD
$hdd_Tier = New-StorageTier -StoragePoolFriendlyName "My Storage Pool" -FriendlyName HDD_Tier -MediaType HDD
# New-VirtualDisk –SNtoragePoolFriendlyName "My Storage Pool" –ResiliencySettingName Simple –Size 10TB –Provisioningtype Thin –FriendlyName "Documents"
# Create a new virtual disk in the pool with a name of TieredSpace using the SSD (50GB) and HDD (300GB) tiers
$vd1 = New-VirtualDisk -StoragePoolFriendlyName "My Storage Pool" -FriendlyName TieredSpace -StorageTiers @($ssd_tier, $hdd_tier) -StorageTierSizes @(50GB, 300GB) -ResiliencySettingName Mirror -WriteCacheSize 1GB # cannot also specify -size if using tiers and also cannot use provisioning type, e.g. Thin