Skip to content

Instantly share code, notes, and snippets.

@gwblok
Created December 23, 2019 21:04
Show Gist options
  • Save gwblok/48b5ca82e6836a58e93b695793d42bc9 to your computer and use it in GitHub Desktop.
Save gwblok/48b5ca82e6836a58e93b695793d42bc9 to your computer and use it in GitHub Desktop.
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