diff --git a/powershell/check-hcl-poc.ps1 b/powershell/check-hcl-poc.ps1 index d7e1630..0dbf123 100644 --- a/powershell/check-hcl-poc.ps1 +++ b/powershell/check-hcl-poc.ps1 @@ -71,6 +71,7 @@ Foreach ($vmHost in $vmHosts) { # ...need more Hardware to test. #If ($HostModel -eq $server.model) { # Works vor HP and Dell, where string matches 100% $ModelFound = $false + $ModelMatch = $server.model if ($HostModel.StartsWith("UCS") -and $ModelMatch.Contains("UCS")){ $HostLen=$HostModel.Length @@ -96,7 +97,6 @@ Foreach ($vmHost in $vmHosts) { } } - $ModelMatch = $server.model $ModelMatch = $ModelMatch -replace "IBM ","" # IBM writes "IBM" in front of models sometimes. Need to remove it $ModelMatch = ("*"+$ModelMatch+"*") # Not all entries are 100% matches. Simple wildcard matching #Write-Host "Model Match String:" $ModelMatch @@ -161,4 +161,4 @@ Foreach ($vmHost in $vmHosts) { Write-Host " --- HCL Link: $($obj.url)" } } -} \ No newline at end of file +}