(imported topic written by SystemAdmin)
I wrote a task to check for specific model Dell machines, if they had less than the latest version of their BIOS, and then deploy the updates to them. It’s working but I can’t imagine that I did a very good job of optimizing the relevance. Can anybody take a crack at making this better?
Relevance:
(name of operating system as lowercase starts with “win”) AND (exists wmi) AND ( (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “latitude e5500”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < ")) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “latitude e6500”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A16”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “latitude d630c”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A10”)) OR ((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “latitude d830”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A14”) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 740”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “2.2.3”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 745”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “2.6.2”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 960”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A05”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “precision workStation 650”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A05”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “precision workStation 650”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A05”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “precision workStation 670”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A07”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “precision workStation 530 mt”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A11”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex gx260”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A09”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex gx620”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A10”)) OR (((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “dimension 4600i”) AND ((substring after “=” of (selects (“SMBIOSBIOSVersion FROM Win32_BIOS”) of WMI as string)) < “A12”)) )
Action:
//Dell Latitude E5500 update to BIOS version A13 IF
{ (((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"latitude e5500") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A13"))
} waithidden __Download\E5500A13.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Latitude 65500 update to BIOS version A16 IF
{ (((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"latitude e6500") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A16"))
} waithidden __Download\E6500A16.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Latitude D630C update to BIOS version A10 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"latitude d630c") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A10"))
} waithidden __Download\D630CA10.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Latitude D830 update to BIOS version A14 IF
{((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"latitude d830") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A14")
} waithidden __Download\D830_A14.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell OptiPlex 740 update to BIOS version 2.2.3
//IF {(((string value of selects "Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase = "optiplex 740") AND ((substring after "=" of (selects ("SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) < "2.2.3"))}
//waithidden __Download\O740-223.EXE -NOPAUSE -NOREBOOT
//ENDIF
//Dell OptiPlex 745 update to BIOS version 2.6.2
//IF {(((string value of selects "Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase = "optiplex 745") AND ((substring after "=" of (selects ("SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) < "2.6.2"))}
//waithidden __Download\o745-020602.exe -NOPAUSE -NOREBOOT
//ENDIF
//Dell OptiPlex 960 update to BIOS version A05 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"optiplex 960") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A05"))
} waithidden __Download\O960-A05.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Precision Workstation 650 update to BIOS version A05 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"precision workstation 650") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A05"))
} waithidden __Download\WS650A05.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Precision Workstation 670 update to BIOS version A07 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"precision workstation 670") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A07"))
} waithidden __Download\WS670A07.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Precision Workstation 530 MT update to BIOS version A11 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"precision workstation 530 mt") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A11"))
} waithidden __Download\WS530A11.exe -NOPAUSE -NOREBOOT ENDIF
//Dell OptiPlex GX260 update to BIOS version A09 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"optiplex gx260") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A09"))
} waithidden __Download\GX260A09.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell OptiPlex GX620 update to BIOS version A10 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"optiplex gx620") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A10"))
} waithidden __Download\GX620A10.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Dimension 4600i update to BIOS version A12 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"dimension 4600i") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A12"))
} waithidden __Download\D4600A12.EXE -NOPAUSE -NOREBOOT ENDIF
//Dell Inspiron 600m update to BIOS version A17 IF
{(((string value of selects
"Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase =
"inspiron 600m") AND ((substring after
"=" of (selects (
"SMBIOSBIOSVersion FROM Win32_BIOS") of WMI as string)) <
"A17"))
} waithidden __Download\I600mA17.exe -NOPAUSE -NOREBOOT ENDIF