# Get-MountedDevices.ps1 # Lists mounted devices and drive letter mappings Write-Host "=== Mounted Devices ===" -ForegroundColor Cyan Write-Host "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices" try { $mounted = Get-ItemProperty -Path "HKLM:\SYSTEM\MountedDevices" -ErrorAction SilentlyContinue if ($mounted) { $mounted.PSObject.Properties | Where-Object { $_.Name -notmatch "^PS" } | ForEach-Object { Write-Host "$($_.Name)" -ForegroundColor Yellow } } } catch { Write-Host "Error: $_" -ForegroundColor Red }