This is pretty simple, as long as you have HPCMSL on your end points, and if you’re running HP Devices, you should just do it!
Related Posts:
- HP CMSL – ConfigMgr CIs (Auto Install and Update HPCMSL using CM CIs)
- Gathering Battery Information via PowerShell & WMI
HP Power Manager is a nifty tool to provide Battery Status information and set policy around battery Management. Extensive information can be found here: HP Business Notebook PCs – HP Power Manager | HP® Customer Support
![](https://garytown.com/wp-content/uploads/2023/04/image-91.png)
In this Post I’m going to provide the information to have it automatically deploy to your end points
Configuration Item
![](https://garytown.com/wp-content/uploads/2023/04/image-92-1024x687.png)
![](https://garytown.com/wp-content/uploads/2023/04/image-93.png)
Detection Method: (Makes sure the device is HP & a Laptop)
$Baseboard = Get-CimInstance -ClassName Win32_Baseboard
$LaptopChassisTypes = @("8","9","10","11","12","14","18","21","30","31")
#Confirm Device is HP
If (($Baseboard.Manufacturer -match "HP") -or ($Baseboard.Manufacturer -match "Hewlett")) {
$chassi = gwmi -Class 'Win32_SystemEnclosure'
if ($chassi.ChassisTypes -in $LaptopChassisTypes){ #Confirm Laptop
Write-Output "HP Laptop"
}
}
Settings: Discovery Script
![](https://garytown.com/wp-content/uploads/2023/04/image-94-1024x775.png)
if (Get-AppxPackage | Where-Object {$_.Name -match "HPPowerManager"}){
Write-Output "Compliant"
}
else {
Write-Output "Non-Compliant"
}
Settings: Remediation Script
![](https://garytown.com/wp-content/uploads/2023/04/image-95-1024x247.png)
$SoftPaqInfo = Get-SoftpaqList -Category Software | Where-Object {$_.Name -match "Power Manager"}
Get-Softpaq -Number $SoftPaqInfo.id -SaveAs "C:\swsetup\$($SoftPaqInfo.id).exe" -Action silentinstall
Compliance Rules:
![](https://garytown.com/wp-content/uploads/2023/04/image-96.png)
And with that, add it to your HP Baseline
![](https://garytown.com/wp-content/uploads/2023/04/image-97-993x1024.png)
And HP Power Manager will automatically be downloaded and installed the next time the baseline runs.
![](https://garytown.com/wp-content/uploads/2023/04/image-98.png)
![](https://garytown.com/wp-content/uploads/2023/04/image-99-1024x177.png)
![](https://garytown.com/wp-content/uploads/2023/04/image-100.png)
![](https://garytown.com/wp-content/uploads/2023/04/image-101-838x1024.png)
![](https://garytown.com/wp-content/uploads/2023/04/image-102-1024x291.png)
Get-AppxPackage -AllUsers | Where-Object {$_.Name -match "HPPowerManager"}
To Uninstall, just pipe that to Remove-AppxPackage -AllUsers
![](https://garytown.com/wp-content/uploads/2023/04/image-103-1024x79.png)
Then you can trigger your baseline again and confirm it all still works. Takes a couple minutes to reinstall..
![](https://garytown.com/wp-content/uploads/2023/04/image-104-1024x365.png)
Based on this example, you can deploy pretty much any of the HP Management software using HPCMSL.
GARYTOWN.COM