- Get-VirtualDisk -friendlyname vd01
- Resize-VirtualDisk -FriendlyName “vd01” -Size 100GB
- $vDiskMax = Get-VirtualDisk FriendlyName vd01 | Get-Disk | Get-Partition | ? Type -eq Basic | Get- PartitionSupportedSize
- Get-VirtualDisk -FriendlyName vd01 | Get-Disk | Get-Partition | ? Type -eq Basic | Resize-Partition -Size $vDiskMax.SizeMax
https://charbelnemnom.com/how-to-expand-and-resize-storage-spaces-direct-csv-volume-ws2016-hyperv-s2d/
Create new virtual disk
- New-VirtualDisk –StoragePoolFriendlyName “S2D*” –FriendlyName VD04 –ResiliencySettingName Mirror –Size 10GB
- Get-ClusterResource -Name “Cluster Virtual Disk (VD04)” | Suspend-ClusterResource
- $disknubmer =Get-VirtualDisk -FriendlyName vd04 | get-disk
- New-Partition –DiskNumber $disknubme.Number –AssignDriveLetter –UseMaximumSize
- $part=Get-VirtualDisk -FriendlyName vd04 | Get-Disk | Get-Partition | ? Type -eq Basic
- Format-Volume -Partition $part -FileSystem refs
- Get-ClusterResource -Name “Cluster Virtual Disk (VD04)” | Resume-ClusterResource
- Get-ClusterResource -Name “Cluster Virtual Disk (VD04)” | Add-ClusterSharedVolume