The powershell command corresponding to the above action is as follows new-virtualdisk -storagepooluniqueid (get-storagepool -friendlyname storage pool name).uniqueid -friendlyname desired storage space name -size 100gb get-virtualdisk -friendlyname 'space'|initialize-disk -partitionstyle gpt -confirm:$false $disk = get-disk -friendlyname 'the name of the storage space you want to get new-partition -disknumber $disk.disknumber -driveletter 'hard disk code' -usemaximumsize.
Format-volume -driveletter 'hard drive letter' -filesystem ntfs -confirm:$false -force next, we will introduce what to do if the hard drive is broken. if an error occurs, it will be displayed as shown below. the steps to be done at this time are as follows: shut down → remove the my board bad hard drive → put the good hard drive back → turn on, but there is the ui will not repair itself, so you have to manually use the key powershell command to solve the problem.
Powershell_03 after booting, execute the following powershell syntax to reset the wrong hard drive. $baddisks = get-physicaldisk | where-object -filterscript {$_.healthstatus -eq “unhealthy”} foreach ($baddisk in $baddisks) { reset-physicaldisk -uniqueid $baddisk.uniqueid } powershell_04 if the new hard drive does not appear, you need the following syntax to add the new hard drive to the storage area $pdtoadd = get-physicaldisk -canpool $true add-physicaldisk -storagepoolfriendlyname "storage pool name" -physicaldisks $pdtoadd if there is still an erroneous hard drive under the physical hard drive at this time, you need to remove the erroneous hard drive.