Impossibile to store DiskNumber knowing the disk label

Copper Contributor





PS C:\Users\utente> Get-Disk | Where-Object { $_.FriendlyName -eq 'XXXXX' }
PS C:\Users\utente>





Impossible is assign letter (Example b) a disk with label "XXXXX'





$DiskNumber = Get-Disk | Where-Object { $_.FriendlyName -eq 'XXXXX' }
Get-Partition -DiskNumber $($DiskNumber.Number) | Set-Partition - newDriveLetter b







1 Reply
I follow the same cmdlets you used and was able to set a drive letter
what is the error you are getting..