MSEndpointMgr / ConfigMgr

Microsoft Endpoint Configuration Manager scripts and tools
634 stars 281 forks source link

PSA: Bugs in new version of Invoke-HPBIOSUpdate and Invoke-LenovoBIOSUpdate #136

Closed Ginolard closed 5 years ago

Ginolard commented 5 years ago

I've already emailed Nikolaj about this but this is so everyone else is aware.

In these two scripts it checks if $Password -ne $null but $Password is a string and is optional so, unless specified, will be empty. An empty string is not $null, it's just an empty string.

Change the If statement to either of the following:-

if ($Password) 
if ($Password -ne "") 
NickolajA commented 5 years ago

Fixed in 1.0.4 for HP script and 1.0.9 for Lenovo script.