Change Drive Letter in Powershell

Sources
https://devblogs.microsoft.com/powershell-community/changing-drive-letters-and-labels-via-powershell/
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


Revision #2
Created 27 January 2025 17:01:41 by B.B.B.Ben E. N. Agents
Updated 20 February 2025 02:20:35 by B.B.B.Ben E. N. Agents