Hello,
I found out a problem with Surface Driver. The problem is both on the script invoke-cmapplydriverpackage.ps1 and in the driver automation tool.
The problem is when there's a sku that is empty or space, it get parsed as an empty string and not removed. Thus, when running "Confirm-SystemSku", the -match job pull a match when the string is empty.
Exemple I have, surface pro 6 drivers pack for windows 10. The systemSku, when doing copy/paste, we don't have any empty char:
(Models included:Surface_Pro_6_1796_Consumer, Surface_Pro_6_1796_Commercial)
We can see on the picture a line break, maybe it's just because of number of char.
![surface_sku_sccm_package](https://user-images.githubusercontent.com/324425/98988086-1f8f3b00-24f5-11eb-9f69-c308738eae28.png)
But, in the code, running in debug for a suface pro 4, the sku will match. During the "Confirm-SystemSku" function, $DriverPackageInputArray = "Surface_Pro_6_1796_Consumer", "", "Surface_Pro_6_1796_Commercial"
As we can see, there's a "" value.
Here's a screenshot of what going on while processing ""
![surface_sku_function](https://user-images.githubusercontent.com/324425/98988478-bbb94200-24f5-11eb-9982-6e117cba2f49.png)
Currently, we can see we're at line 1669, which is after the match. We can see below the value of $SystemSkuItem is Empty and $computerData.SystemSku = "surface_pro_4", thus, it shouldn't be a match.
What's needed is skipping null, and the correction to line 1667 is
if ($ComputerData.SystemSKU -match $SystemSKUItem -and $SystemSKUItem -ne "") {
tested and working for me