Skip to content

Commit

Permalink
skip not readable categories
Browse files Browse the repository at this point in the history
  • Loading branch information
lublak authored and AndrewPla committed Oct 31, 2023
1 parent ded5bac commit 3df831a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (Get-CimInstance -ClassName Win32_ComputerSystem -Filter "Manufacturer LIKE '
& '.\Install and Import Module.ps1' -ModuleName $ModuleName
Get-ChildItem DellSmbios:\ | ForEach-Object {
$Category = $_.Category
Get-ChildItem DellSmbios:\"$Category" | ForEach-Object {
Get-ChildItem DellSmbios:\"$Category" -ErrorAction SilentlyContinue | ForEach-Object {
[PSCustomObject]@{
Category = $Category
Attribute = $_.Attribute
Expand All @@ -15,4 +15,4 @@ if (Get-CimInstance -ClassName Win32_ComputerSystem -Filter "Manufacturer LIKE '
}
}
}
}
}

0 comments on commit 3df831a

Please sign in to comment.