
This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.
# Retrieving the disc statistics (not only suitable for S2D)
Get-Disk

# Remove StoragePools and Reset Disks
Update-StorageProviderCache
Get-StoragePool | ? IsPrimordial -eq $false | Set-StoragePool -IsReadOnly:$false -ErrorAction SilentlyContinue
Get-StoragePool | ? IsPrimordial -eq $false | Get-VirtualDisk | Remove-VirtualDisk -Confirm:$false -ErrorAction SilentlyContinue
Get-StoragePool | ? IsPrimordial -eq $false | Remove-StoragePool -Confirm:$false -ErrorAction SilentlyContinue
Get-PhysicalDisk | Reset-PhysicalDisk -ErrorAction SilentlyContinue

# Physical Option
# Disk - Preparation for S2D operation
Get-Disk | ? Number -ne $null | ? IsBoot -ne $true | ? IsSystem -ne $true | ? PartitionStyle -ne RAW | % {
$_ | Set-Disk -isoffline:$false
$_ | Set-Disk -isreadonly:$false
$_ | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false
$_ | Set-Disk -isreadonly:$true
$_ | Set-Disk -isoffline:$true
}
# Virtual Option
Get-Disk | ? FriendlyName -eq "Msft Virtual Disk" | ? Number -ne $null | ? IsBoot -ne $true | ? IsSystem -ne $true | ? PartitionStyle -ne RAW | % {
$_ | Set-Disk -isoffline:$false
$_ | Set-Disk -isreadonly:$false
$_ | Clear-Disk -RemoveData -RemoveOEM -Confirm:$false
$_ | Set-Disk -isreadonly:$true
$_ | Set-Disk -isoffline:$true
}

# Retrieving the disc statistics (S2D-capable only)
Get-Disk | ? Number -ne $null | ? IsBoot -ne $true | ? IsSystem -ne $true

# Retrieving the number of different hard disk types
Get-Disk | Where Number -Ne $Null | Where IsBoot -Ne $True | Where IsSystem -Ne $True | Where PartitionStyle -Eq RAW | Group -NoElement -Property FriendlyName

# Determination of disc usage
Get-PhysicalDisk
As you can see there are disks with the usage description "Auto-Select" and "Journal". Journal are the disks selected for caching.
Attention, this is an unsupported scenario.


References:
Deploy Storage Spaces Direct on Windows Server
Step-by-step instructions to deploy software-defined storage with Storage Spaces Direct in Windows Server as either hyperconverged infrastructure or converged (also known as disaggregated) infrastructure.

Azure-Stack-HCI-Single-Server-Deployment/PrepareVolumes.ps1 at main · chtwilfer/Azure-Stack-HCI-Single-Server-Deployment
Contribute to chtwilfer/Azure-Stack-HCI-Single-Server-Deployment development by creating an account on GitHub.
Update-StorageProviderCache (Storage)
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.

Reset-PhysicalDisk (Storage)
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.

Get-StoragePool (Storage)
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
