Diskpart is a command-line tool in Windows system that allows you to manage your disks and partitions.
This post includes detailed guides for how to useDiskpartcommand-line tool to change driver letter in CMD.
Check the steps below.

Open Diskpart tool
In Command Prompt window, you might typediskpartcommand, and pressEnter.
This will initiate the Diskpart command-line utility.
Remember to pressEnterafter typing each command line.

Still, replace * with the exact drive letter of the target drive.
Windows PowerShell can do most things that Command Prompt does.
Alternatively, you’re able to also use Windows PowerShell to change drive letter in Windows 10.

PressWindows + X, and chooseWindows PowerShell (Admin)to run Windows PowerShell utility as administrator.
Next typeget-diskcommand and pressEnterto list all available drives the computer detected.