Skip to content

Commit 4dd99a7

Browse files
committed
Update hw_report.ps1
1 parent 79dfd42 commit 4dd99a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hw_report.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ try {
304304
foreach ($diskTable in $parsedJson.'Disks') {
305305
$outputText += "`t$($diskTable.'HW Name')"
306306
$diskType = "HDD"
307-
if ($diskTable.'Path'.StartsWith("\\.\CdRom")) {
307+
$diskPath = $diskTable.'Path'
308+
if ($null -ne $diskPath -and $diskPath.StartsWith("\\.\CdRom")) {
308309
$diskType = "CD-ROM"
309310
}
310311
elseif ($diskTable.'SSD' -eq $true) {

0 commit comments

Comments
 (0)