NetRock6
asked on
PowerShell: Force to change the Drive Letter
Using the below Powershell command, I am trying to change the drive but it fails with error: "drive is in used"
is there a way to force it to change as we can change in the Windows Dick Management Console
Thanks.... ;)
is there a way to force it to change as we can change in the Windows Dick Management Console
Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter G
Thanks.... ;)
Can you restart your system once and check if you can change drive letter. Command you mentioned is the easiest way to do it.
try setting the drive offline, set the drive letter set the drive online
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$drive = Get-WmiObject -Class win32_volume -Filter "DriveLetter = 'x:'"
Set-WmiInstance -input $drive -Arguments @{DriveLetter="G:"; Label="Label"}
I am also interested in this version of windows you have which has "change in the Windows Dick Management Console" - I've not seen a dick management console - but it is the funniest typo I've seen in a while - thanks for the laugh!