Monday, 1 December 2008

Get-DVD.ps1

# Get-DVD.ps1
#
Sample using PowerShell
#
2nd sample from http://msdn.microsoft.com/en-us/library/aa394587
#
Thomas Lee

$drives = Get-WmiObject -Class Win32_CDROMDrive

# Display CD info

$drives | Format-Table DeviceID, Description, Name

This script produces the following output:
PS C:\foo> .\get-DVD.ps1

DeviceID Description Name
-------- ----------- ----
IDE\CDROMTSSTCORP_DVD
+-RW_TS-H653B_______________D200____\5&1E5D3123&0&0.0.0 CD-ROM Drive TSSTcorp DVD+-RW TS-H653B ATA Device
IDE\CDROMTSSTCORP_DVD
-ROM_TS-H353B_______________D200____\5&3116E1C8&0&1.0.0 CD-ROM Drive TSSTcorp DVD-ROM TS-H353B ATA Device
SCSI\CDROM
&VEN_GF7300L&PROD_AZZ836K&REV_1.01\5&36E5972&1&000000 CD-ROM Drive GF7300L AZZ836K SCSI CdRom Device

No comments: