Detect Monitor and Install Firware if Detected

Newbie apologies

I am trying to detect a monitor and if the monitor is present I wish to download and install firmware for the monitor. What I am thinking process would be like.

I need to run an If then with the following key
Get-WmiObject -Class win32_desktopmonitor
Specifically the Name to match LEN P24h-20

if it matches, then I would like to
Download this ISPTool_V3.7.4.5_Ver5–


Then unzip the file.

Then Run \ISPTool_V3.7.4.5_Ver5–P24h-20_L2.0\ISPTool.exe from the path.

@hhramos Welcome to PowerShell.Org forums.

you have got the logic correct., Wow. Its just a matter of writing few more lines :-).

Get-WmiObject is obsolete and you may use Get-CimInstance with -Filter parameter where you can filter your monitor name.

$Requiredmonitor = Get-CimInstance -Class win32_desktopmonitor -Filter "Name = 'LEN P24h-20'"

Now you can use Invoke-WebRequest to download the file, do look at examples, especiall -OutFile parameter.

Invoke-WebRequest (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Docs


Thank you so much. I will give this a try.

This is what I have:
if ($Requiredmonitor = Get-CimInstance -Class win32_desktopmonitor -Filter “Name = ‘LEN P24h-20’”) {
‘The monitor connected is a lenovo P24h-20’

Source file location

$source = ‘

Destination to save the file

$destination = ‘c:\lenovomonitordownload\ISPTool_V3.7.4.5_Ver5–’
#Download the file
Invoke-WebRequest -Uri $source -OutFile $destination

} Else {

‘The connected monitor is not a Lenovo P24h-20’