Has anyone had success with installing Bios updates via Company Portal packaged with intunewin? Are there specific command line options or scripts that work best to run the installers?
I’ve been able to get BIOS updates to install through the company portal, but my detection rules aren’t working at the moment. This is the script I use to install the BIOS update on our AMD 7040s utilizing PowerShell:
===== Variables =====
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$BiosExe = Join-Path $ScriptDir "Framework_Laptop_13_Ryzen7040_BIOS_3.18.exe"
$MarkerDir = "C:\ProgramData\Framework"
$MarkerFile = "$MarkerDir\BIOS318.updating"
===== Create marker directory =====
if (!(Test-Path $MarkerDir)) {
New-Item -ItemType Directory -Path $MarkerDir -Force | Out-Null
}
===== Create in-progress marker =====
New-Item -ItemType File -Path $MarkerFile -Force | Out-Null
===== Validate BIOS EXE =====
if (!(Test-Path $BiosExe)) {
Write-Output "BIOS installer not found at $BiosExe"
exit 1
}
===== Run BIOS update =====
$process = Start-Process -FilePath $BiosExe
-ArgumentList "-s -r -noconfirm -nopause" -Wait
-PassThru
if ($process.ExitCode -eq 0) {
exit 0
}
else {
Remove-Item $MarkerFile -ErrorAction SilentlyContinue
exit 1
}
For the install command, I use:
powershell.exe -ExecutionPolicy Bypass -File bios_install.ps1
For the installation time, I set that to 10 minutes and run it as System.
Thanks! I will give that a try.
Have you tried using Registry Detection for the intune Detection rules?
Key Path: Computer\HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\BIOS
Value Name: BIOSVersion
Detection Method: Version Comparison
Operator: Greater than or equal to
Value: 3.18
I haven’t tried that yet. I was attempting to use a marker file that was created from the install script, but you can see how well that went. Doing a registry detection is probably the direction I’ll take next once I have some more time to delve more into it. Thank you for the suggestion!