Skip to content

Instantly share code, notes, and snippets.

@gwblok
Last active April 30, 2020 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwblok/d0aa70a14d0d47d361e51dbac83dba9b to your computer and use it in GitHub Desktop.
Save gwblok/d0aa70a14d0d47d361e51dbac83dba9b to your computer and use it in GitHub Desktop.
HPCMSL CI Detection Methods
#Detection Method for HP Client Management Script Library
(Get-WmiObject -Namespace 'root\cimv2\sms' -Query "SELECT ProductVersion FROM SMS_InstalledSoftware where ARPDisplayName like 'HP Client Management Script Library'").ProductVersion
#Detection Method for HP BIOS Version Compliance / Detection Method for HP Model Supported on Current OS
$HPCMSLVers = (Get-WmiObject -Namespace 'root\cimv2\sms' -Query "SELECT ProductVersion FROM SMS_InstalledSoftware where ARPDisplayName like 'HP Client Management Script Library'").ProductVersion
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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment