Powershell - check if the CD is a CD-ROM
1 answer
You can get this information
(Get-WMIObject -Class Win32_CDROMDrive -Property *).MediaLoaded
You can see what properties are available for this WMI class with
Get-WMIObject -Class Win32_CDROMDrive -Property * | Get-Member
and more detailed documentation from
Get-WMIHelp -Class Win32_CDROMDrive
In general, you will find that the liberal use of cmdlets Get-Help
, Get-Member
, Get-Command
and Get-WMIHelp
provide you with more information and possibly eliminate the need to ask questions like this here and wait for an answer, which may or may not come.
+3
source to share