Sean Killeen bio photo

Sean Killeen

Just a guy trying to get better at writing bios.

Email Twitter Facebook Google+ LinkedIn Instagram Github Stackoverflow Foursquare
Edit this page | Issue? Question?

Problem

I need to change the letter of a mounted drive via PowerShell.

Solution

Start Powershell as an admin and run the following two lines, where ‘x’ is the current drive letter and y is the drive letter you’d like it to be:

$drive = Get-WmiObject -Class win32_volume -Filter "DriveLetter = 'x:'"
Set-WmiInstance -input $drive -Arguments @{DriveLetter="Y:";}

References