Forum Discussion

Fasyrio's avatar
Fasyrio
Copper Contributor
Sep 28, 2021

Impossibile to store DiskNumber knowing the disk label

 

 

 

 

 

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

 

 

 

 

 
 

 

  • farismalaeb's avatar
    farismalaeb
    Steel Contributor
    I follow the same cmdlets you used and was able to set a drive letter
    what is the error you are getting..