How to Reassign CD/DVD Drive Letters in Windows Server 2012 R2 via Disk Management and PowerShell


2 views

Administrators often need to modify drive letter assignments in Windows Server environments. While hard disk volumes can be easily remapped through the classic Disk Management interface (diskmgmt.msc), optical drives present a unique challenge in Windows Server 2012 R2.

Contrary to user expectations, the Server Manager launched by compmgmt.msc doesn't provide direct access to optical drive management. The proper path is:

1. Press Win+X and select "Disk Management"
2. Alternatively, run diskmgmt.msc directly

Windows Server 2012 R2 handles removable media drives differently from fixed disks due to:

  • Dynamic device detection mechanisms
  • Volume mounting architecture differences
  • Historical compatibility layers

For scripting and automation scenarios, PowerShell provides the most reliable method:

# List all disk drives and their current letters
Get-WmiObject -Class Win32_Volume | Select-Object Name, DriveLetter, Label

# Change DVD drive letter (example changing E: to Z:)
$dvd = Get-WmiObject -Class Win32_Volume | Where-Object {$_.DriveLetter -eq 'E:'}
$dvd.DriveLetter = 'Z:'
$dvd.Put()

For administrators preferring graphical tools:

  1. Open Disk Management (diskmgmt.msc)
  2. Right-click the CD/DVD drive in the bottom panel
  3. Select "Change Drive Letter and Paths"
  4. Click "Change" and select the new letter

For persistent assignments across reboots, modify the registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices]
"\\DosDevices\\Z:"=hex:5c,00,3f,00,3f,00,5c,00,43,00,44,00,52,00,4f,00,4d,00,30,00

# Note: Backup registry before making changes

When encountering problems:

  • Ensure the drive isn't currently in use
  • Check for pending system restarts
  • Verify administrator privileges
  • Confirm no group policies are enforcing drive letters

Many administrators hit this roadblock when working with Windows Server 2012 R2 - while reassigning drive letters for hard drives is straightforward through the familiar Disk Management interface (diskmgmt.msc), optical drives seem to be missing from the equation. This isn't actually a limitation of the OS, but rather a UI design choice that obscures the functionality.

Here's the workaround that Microsoft should have documented better:

  1. Launch diskmgmt.msc (either via Run dialog or Server Manager > Tools)
  2. Right-click on your CD/DVD drive in the lower panel (not the upper volume list)
  3. Select "Change Drive Letter and Paths"
  4. Click "Change" and select your preferred letter

For those managing multiple servers or needing scriptable solutions, PowerShell provides cleaner control:

# Get all optical drives
$cdDrives = Get-WmiObject -Class Win32_CDROMDrive

# List available drive letters (excluding system reserved)
$usedLetters = (Get-PSDrive).Name
$allLetters = 67..90 | ForEach-Object { [char]$_ } # C-Z
$availableLetters = $allLetters | Where-Object { $_ -notin $usedLetters }

# Change drive letter for first optical drive
if ($cdDrives) {
    $drive = Get-Partition -DriveLetter D # Current DVD drive
    $drive | Set-Partition -NewDriveLetter $availableLetters[0]
}

Microsoft's rationale stems from the transitional period when Server 2012 R2 was moving from legacy MMC snap-ins to modern management tools. Optical drives were considered legacy devices, so their management was intentionally less prominent in the UI. The functionality remains fully accessible through:

  • The lower panel in diskmgmt.msc
  • DiskPart utility (though more complex)
  • WMI/PowerShell as shown above

For servers where drive letters are scarce, consider mounting optical drives to NTFS folders:

# Create target folder
New-Item -Path "C:\MountPoints\DVD" -ItemType Directory -Force

# Mount first optical drive
Set-Volume -DriveLetter D -NewFileSystemLabel "ArchiveDVD"
mountvol "C:\MountPoints\DVD" \\?\Volume{GUID-HERE}\

Remember to retrieve the actual volume GUID using mountvol without parameters first.

If you encounter "This drive is in use" errors despite no apparent locks:

# Check for open handles
handle.exe -a D:

# Force dismount if needed (CAUTION)
diskpart
select volume D
remove all dismount