Skip to content

Commit 8718fb9

Browse files
committed
correct $null comparison
1 parent 754cb6f commit 8718fb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TOOL-Get-ComputerInfo/Get-ComputerInfo.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ function Get-ComputerInfo {
180180
$Cores = 0
181181
$Sockets = 0
182182
FOREACH ($Proc in $Processors) {
183-
IF ($Proc.numberofcores -eq $null) {
184-
IF ($Proc.SocketDesignation -ne $null) { $Sockets++ }
183+
IF ($null -eq $Proc.numberofcores) {
184+
IF ($null -ne $Proc.SocketDesignation) { $Sockets++ }
185185
$Cores++
186186
}
187187
ELSE {

0 commit comments

Comments
 (0)