windows - How to remove virtual CD/DVD-ROM -
on win10 have possibility mount iso files. each mounted iso system creates virtual cd/dvd-rom drive. see these drives can use powershell:
ps c:\> gwmi win32_cdromdrive caption drive manufacturer volumename ------- ----- ------------ ---------- microsoft virtual dvd-rom volume{b62e0d58-541d-11e6-a1f7-005056873534} (standard cd-rom drives) microsoft virtual dvd-rom volume{d2c8b686-5410-11e6-a1f6-005056873534} (standard cd-rom drives) microsoft virtual dvd-rom cdrom13 (standard cd-rom drives) microsoft virtual dvd-rom cdrom14 (standard cd-rom drives) microsoft virtual dvd-rom cdrom15 (standard cd-rom drives) microsoft virtual dvd-rom cdrom16 (standard cd-rom drives) microsoft virtual dvd-rom cdrom19 (standard cd-rom drives) microsoft virtual dvd-rom volume{b62e1bc8-541d-11e6-a1f7-005056873534} (standard cd-rom drives) necvmwar vmware ide cdr10 ata device d: (standard cd-rom drives)
now question how delete these devices using winapi/powershell whatever ?
i know deleted when u dismount particular image using dismount-diskimage, have "force" option.
$sh = new-object -comobject "shell.application" $sh.namespace(17).items() | where-object { $_.type -eq "cd drive" } | foreach { $_.invokeverb("eject") }
where-object { $_.type -eq "cd drive" } can right click on iso drive file system see?
Comments
Post a Comment