Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Checks if the current installed OS build is supported by HP
$CurrentBuild = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name 'ReleaseID'
$SupportedOSList = $null
$SupportedOSList = Get-HPDeviceDetails -oslist | Where-Object {$_.OperatingSystemRelease -eq $CurrentBuild}
if ($SupportedOSList -ne $null){Write-Output "Compliant"}
else{Write-Output "$CurrentBuild not supported by HP"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment