Powershell Get all Optical Drive Letters
disk, operating-system, powershell, windows
Solution
If you only want the optical drives (as mentioned in your title), use this:
Get-CimInstance Win32_LogicalDisk | ?{ $_.DriveType -eq 5} | select DeviceID
Problem
I am trying to get all drive letters of a Windows system with Powershell, but I cannot figure it out. Any Ideas? I have tried to use `Get-Volume`, but it has no parameter for `-ByDriveType` or `-ByType` or `-Type` or anything.