Last active
February 1, 2024 03:39
-
-
Save contactbrenton/1c9cc38340beada3a31fdb78a77b1533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#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