source: https://hodgkins.io/replace-failed-disk-in-storage-spaces-pool-with-powershell
# Find the failed Disk Get-PhysicalDisk # Shutdown, take the disk out and reboot. Set the missing disk to a variable $missingDisk = Get-PhysicalDisk | Where–Object { $_.OperationalStatus -eq ‘Lost Communication’ } # Retire the missing disk $missingDisk | Set-PhysicalDisk –Usage Retired # Find the name of your new disk Get-PhysicalDisk # Set the replacement disk object to a variable $replacementDisk = Get-PhysicalDisk –FriendlyName PhysicalDisk1 # Add replacement Disk to the Storage Pool Add-PhysicalDisk –PhysicalDisks $replacementDisk –StoragePoolFriendlyName pool # Repair each Volume Repair-VirtualDisk –FriendlyName <VolumeName> # Get the status of the rebuilds Get-StorageJob # Remove failed Virtual Disks Remove-VirtualDisk –FriendlyName <FriendlyName> # Remove the failed Physical Disk from the pool Remove-PhysicalDisk –PhysicalDisks $missingDisk –StoragePoolFriendlyName pool