In Powershell there are a lot of neat little tricks available, today I will show how to change a drive letter using the Win32_Volume WMI class. The full article is available on PowerShell Magazine : Change a drive letter using Win32_Volume class
$DvdDrive = Get-CimInstance -Class Win32_Volume -Filter "driveletter='F:'" Set-CimInstance -InputObject $DvdDrive -Arguments @{DriveLetter="Z:"} |
For more articles like this, have a look at the External Articles section of my blog, it contains all the articles I have posted on external sources such as PowerShell Magazine.
Links in this Article |
PSTip: Change a drive letter using Win32_Volume class |
PowerShell Magazine |
External Articles |
nano 2016: class -Class Win32_Volume does not exist…
Hello Rob,
That is indeed correct that class is missing on Nano, actually I am not aware of any method of changing a drive letter on Nano.
Regards,
Jaap Brasser