Skip to content

Instantly share code, notes, and snippets.

@contactbrenton
Last active February 1, 2024 03:39
Show Gist options
  • Save contactbrenton/1c9cc38340beada3a31fdb78a77b1533 to your computer and use it in GitHub Desktop.
Save contactbrenton/1c9cc38340beada3a31fdb78a77b1533 to your computer and use it in GitHub Desktop.
<#Detection on CI:
#Requires HPCMSL already Installed.
$HPCMSLVers = Get-InstalledModule -Name "HPCMSL" -ErrorAction SilentlyContinue
if ((Get-CimInstance -Namespace root/cimv2 -ClassName Win32_ComputerSystem).Manufacturer -like "H*"){$IsHP = $true}
if ($HPCMSLVers -ne $Null -and $IsHP -eq $true)
{
Write-Output "HP with HPCMSL"
}
#>
#Discovery Script Below:
#Check if HP Bios is Current
[version]$BIOSVersionInstalled = Get-HPBIOSVersion
[version]$BIOSVersionAvailableOnline = (Get-HPBIOSUpdates -latest).Ver
if ($BIOSVersionInstalled -lt $BIOSVersionAvailableOnline)
{Write-Output "Has $($BIOSVersionInstalled), Needs: $($BIOSVersionAvailableOnline)"}
else {Write-Output "Compliant"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment