We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79dfd42 commit 4dd99a7Copy full SHA for 4dd99a7
hw_report.ps1
@@ -304,7 +304,8 @@ try {
304
foreach ($diskTable in $parsedJson.'Disks') {
305
$outputText += "`t$($diskTable.'HW Name')"
306
$diskType = "HDD"
307
- if ($diskTable.'Path'.StartsWith("\\.\CdRom")) {
+ $diskPath = $diskTable.'Path'
308
+ if ($null -ne $diskPath -and $diskPath.StartsWith("\\.\CdRom")) {
309
$diskType = "CD-ROM"
310
}
311
elseif ($diskTable.'SSD' -eq $true) {
0 commit comments