Skip to main content

Change Drive Letter in Powershell

In progress

Source Sources
https://devblogs.microsoft.com/powershell-community/changing-drive-letters-and-labels-via-powershell/ and
https://chindara.medium.com/windows-10-powershell-to-assign-drive-letters-2dcb840191bb

List all the disks.

Get-Disk

List all partitions for a specific disk.

Get-Partition -DiskNumber 1

Change the drive letter for a partition.

Get-Partition -DiskNumber 1 -PartitionNumber 2 | Set-Partition -NewDriveLetter Z