HP Client Management Script Library 1.4 released

Today we release HP Client Management Script library v1.4. With this release, we've started working on making the library more idiomatic, based on feedback and best practices. The first thing you may notice is that the casing of the parameters has been altered to match coding standards (although, this is an ongoing process), and where possible the parameters have been changed to match those used by Microsoft in their own libraries. One example is the remote computer name used during remote operations, which was previously specified as -target now is specified as -ComputerName. The old parameter name is still accepted as a parameter alias.

Speaking of remote operations, we've added support for passing your own CimSession to functions that support remote operations. This allows you to specify more complex authentication rules, or use Wsman instead of DCOM for remote operations.

For example, to use Wsman instead of DCOM, create your session and pass it to the function:

$SessionOption = New-CimSessionOption -Protocol Wsman -ComputerName MyPC
$MySession = New-CimSession -ComputerName MyServer -SessionOption $SessionOption
Get-HPBIOSSettingsList -CimSession $MySession

Secure Platform Management and HP Sure Recover

Version 1.4 of the library  introduces support for HP Secure Platform Management and HP Sure Recover provisioning. We won't go too much in depth on these features in this blog post since we plan a separate blog entry (or entries) on this subject.  Why may you want to consider using Sure Recover? Check out the linked PDF above.

HPIA Offline Repository

A number of our customers have tried to use HP Image Asisstant (HPIA) in environments where network access is problematic, so they've asked for a capability to create an offline repository that HPIA can consume without reaching out to HP servers. We have extended the HP CMSL repository module to (optionally) download all files that HPIA may require for analyzing a specific set of platforms. This can be retrofitted to existing repositories with a simple setting change:

Set-RepositoryConfiguration -Setting OfflineCacheMode -CacheValue Enable 

Once this is set, next time synchronization is invoked, additional datafiles will be downloaded into the repository  Then you can tell HPIA to use the repository as a data source (assume C:\MyRepository is your HP CMSL repository):

HPImageAssistant.exe /OfflineMode:C:\MyRepository  /Operation:Analyze  [additional parameters]


Powershell Gallery

This will  be the first release that will be published to the powershell gallery, and you will be able to install it via the 'Install-Package HPCMSL' command. Availability in the gallery may lag a couple of days behind the official packaged release, while we work out bugs in our release pipeline.

Since we finally solved most of our issues with the powershell gallery publishing, we are abandoning work on the Library Maintenance module, and it has been removed. We appologize for this, but we are confident most people would rather use Power Shell Gallery than a proprietary solution.


Summary image credit Jill Wellington, Michigan, USA, via pexels.com


Author : txvalp

I use the CMSL to create and maintain a driver repository for ~35 models of HP desktops, laptops, and tablets. Prior to upgrading to v1.4 (from v1.3), this scripted process took, on average, about 2-2.5 hours to complete. Now it takes well over 10 hours. All of the syntax is correct in the script and the operation does complete successfully, it just does so very slowly, even when synchronizing the same model twice in a row (you would think the second run through would be extremely quick). I have not enabled the OfflineCacheMode option and the overall size of the driver repository is roughly identical, so it's not like there's a bunch more data being processed. I just performed a test with the HP EliteDesk 800 G5 [Baseboard ID 8595] and it took around 45 minutes to complete just that single model against an already built repository that was updated yesterday. If you have any suggestions as to how I could speed up or optimize this process with v1.4, I would greatly appreciate it.

Noticed the same issue as the other commenter, repository synchronization takes a lot more time due to downloading files that are already present. I managed to track this down to a change in the 'Out-SoftpaqField' function (HP.Softpaq.psm1) where all strings returned from the function is manipulated by a TrimStart() method, specifically "TrimStart("0x")". I suspect this is only supposed to be applied to strings from the 'System Information' section in the CVA files, i.e. to return SysIDs without the '0x' prefix. However, when this trim is applied to all strings, MD5- and SHA256 hash values in the CVA starting with a zero will also be changed, having the '0' removed at the beginning. This leads to a re-download of the file in question. It's a simple fix, simply replace line 462 in HP.Softpaq.psm1 with 'return $result', like it was in version 1.3.0. Note! I have not done extensive testing on this modification, and a such it may have unforeseen consequences. Hopefully, this will be fixed in the next version.

For me, Offline Mode has sense against a LanRepo. And this scenario seems to be not enough tested by HP. https://developers.hp.com/hp-client-management/forum/questions-about-hpiascriptlibrary-offlinemode#comment-2385 https://h30434.www3.hp.com/t5/Commercial-PC-Software/HPIA-4-5-4-1-Offline-Mode-require-write-access/m-p/7497897/highlight/false#M3869

Sorry for the late reply. @AKnox If you are willing to share your repository.json, please do so in the support forum, and we can look to see where the bottleneck is. We will have some optimization in 1.5 (in previous versions it was doing multiple checksum checks unnecessarily, but that was also present in 1.3 I think?) @alaseg That was fixed in 1.4.3. Yes, your observation was fairly correct, it was an incorrect trim. @e.pardo I will check that this was an issue that was addressed.