Team I am doing Win7 to Win10 inplace upgrade on various models, HP, and Dell, and I need to change the bios to UEFI as part of the process. I have this little script I wrote, but for some reason it is not recognizing the device is a HP. When I run it on Dell, it echos it is a dell as expected. When run on HP, it echos that it is a Dell

$computerSystem = (Get-WmiObject -Class:Win32_ComputerSystem)
if ($computerSystem.Manufacturer= "Dell Inc" )
#{ Start-process "cmd.exe" "/c C:\temp\Win10\Post_Install\Dell_BIOS.cmd"}

{write-host "this is a Dell"}

else
{write-host "this is an HP"}
6 Spice ups

its -eq not =

if ($computerSystem.Manufacturer -eq “Dell Inc” )
But I suggest use -match

$computerSystem = (Get-WmiObject -Class:Win32_ComputerSystem)
if ($computerSystem.Manufacturer -match "Dell Inc" )
{write-host "this is a Dell"
Start-process "cmd.exe" "/c C:\temp\Win10\Post_Install\Dell_BIOS.cmd"
}
else
{write-host "this not dell"}

in general

$check=(Get-WmiObject -Class:Win32_ComputerSystem).Manufacturer
Write-Host "Manufacturer is $check"
3 Spice ups

Awesome this worked thanks.