Using powershell I am attempting to get a report based on a predefined list of computers that shows which do not have a CDROMDrive.
Here is a sample of how I was attempting to generate the report. The problem is that if a computer does not have a CDROMDrive there is not output.
$computers = Import-Csv c:\garb\9010-13.csv
$computers | foreach-object {
Get-WmiObject -computername $_.computername win32_cdromdrive | Select-Object pscomputername, caption, drive}
My current code is working in that it's output shows the CDROMDrives available on each computer.
The code is not working in that it returns no information if a computer does not have any CDROMDrives available. I need the output to show computers that do not have CDROMDrives specifically.