File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1275,19 +1275,22 @@ function Write-DiskConfiguration
12751275
12761276 # One of the three letters mentioned above may be already in use. Check these before assuming they're our targets.
12771277 # This is more the case when you boot the ISO with Ventoy
1278- if ((Get-Volume | Where-Object { $_.DriveLetter -eq $espLetter }).Count -gt 0 ) {
1278+ # ---
1279+ # Preview 7 Edit -- powershell doesn't consider the count property until we select the object, therefore still causing the issue.
1280+ # Why, you stupid heap of C# junk?????
1281+ if ((Get-Volume | Where-Object { $_.DriveLetter -eq $espLetter } | Select-Object - ExpandProperty DriveLetter).Count -gt 0 ) {
12791282 Write-Host " The default letter for the EFI System Partition is already in use."
12801283 $usedLetters ++
12811284 $espUsed = $true
12821285 }
12831286
1284- if ((Get-Volume | Where-Object { $_.DriveLetter -eq $bootLetter }).Count -gt 0 ) {
1287+ if ((Get-Volume | Where-Object { $_.DriveLetter -eq $bootLetter } | Select-Object - ExpandProperty DriveLetter ).Count -gt 0 ) {
12851288 Write-Host " The default letter for the boot partition is already in use."
12861289 $usedLetters ++
12871290 $bootUsed = $true
12881291 }
12891292
1290- if ((Get-Volume | Where-Object { $_.DriveLetter -eq $recoveryLetter }).Count -gt 0 ) {
1293+ if ((Get-Volume | Where-Object { $_.DriveLetter -eq $recoveryLetter } | Select-Object - ExpandProperty DriveLetter ).Count -gt 0 ) {
12911294 Write-Host " The default letter for the Windows Recovery Environment partition is already in use."
12921295 $usedLetters ++
12931296 $recoveryUsed = $true
You can’t perform that action at this time.
0 commit comments