MSEndpointMgr / ConfigMgr

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

Invoke-CMApplyDriverPackage.ps1 -v4.0.1 - Random Crash #255

Open gossman opened 4 years ago

gossman commented 4 years ago

Morning,

Had a search but cant seem to find anyone reporting this already and the logs haven't given me much to look at so could use some directions please.

Driver install being applied to a Lenovo as part of a fresh install. ApplyDriverPackage.log shows:

[ApplyDriverPackage]: Apply Driver Package process initiated ApplyDriverPackage 31/07/2020 11:15:29 1096 (0x0448)

Task sequence is running: Invoke-CMApplyDriverPackage-New.ps1 -BareMetal -Endpoint "FQDNOFSCCMSERVER" -TargetOSVersion 1909

Any help would be appreciated.

Cheers

merlinfrombelgium commented 4 years ago

@gossman I suspect you have not set the required Task Sequence variables of MDMUserName and MDMPassword. Then again, this has not been documented yet...

For now, please see https://github.com/MSEndpointMgr/ConfigMgr/issues/243#issuecomment-664565089 #243 for details.

gossman commented 4 years ago

@merlinfrombelgium You suspect correct, I haven't seen any documentation surrounding those 2 variables so wouldn't even know what its expecting as correct data. Am I ahead of the game and v4.0.1 is not yet released?

merlinfrombelgium commented 4 years ago

@gossman it's released Docs haven't been updated yet. Just follow those instructions and you'll be good.

gossman commented 4 years ago

@merlinfrombelgium Thank you, set the 2 variables will retest and post back here. Likely be Monday.

merlinfrombelgium commented 4 years ago

Take your time 🙂 Nobody's rushing you. Enjoy the weekend!

gossman commented 4 years ago

@merlinfrombelgium Morning Merlin,

Hope you had a good one?

I have given it a go this morning and it appears to have gone further, I see the MDMUserName and MDMPassword called which looks successful however I have another failure but again I cant see an actual error message, just the line to say check the previous error message.

Here's the latest log:

[ApplyDriverPackage]: Apply Driver Package process initiated ApplyDriverPackage 03/08/2020 10:17:57 1792 (0x0700)

The model being tested is a Lenovo V130-14IKB. I noticed the second to last entry refers to a ThinkPad L560.

Cheers

merlinfrombelgium commented 4 years ago

I may have missed this information in previous messages, but are you using zipped packages and if so, the 7-zip format?

gossman commented 4 years ago

Hi,

No, the drivers are imported using the Driver Automation tool with these selections: image

The source where the package gets extracted to as part of the Automation tool import process shows the files are extracted: image

The above references just one of the individual drivers, there are many under the DriverPkg*Subfolders*.

Thanks

merlinfrombelgium commented 4 years ago

It seems to fail to match the DriverPackage against the SKU of the hardware or against the OS. That's my conclusion, since there is no detailed log entry between [DriverPackage:ZLS0032C]: Processing driver package with 4 detection methods: Drivers - Lenovo ThinkPad L560 - Windows 10 1909 x64 ApplyDriverPackage 03/08/2020 10:18:01 1792 (0x0700) and [ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages ApplyDriverPackage 03/08/2020 10:18:01 1792 (0x0700)

Could you please post a screenshot of or copy/paste the package description of package ZLS0032C?

Also, I'm curious if running the script with the OSVersionFallback parameter does return a result.

gossman commented 4 years ago

Ahha!

So it appears the DAT didn't create a package for the actual model although has put the drivers in the correct location.

The package ZLS0032C appears to be solely for the ThinkPad L560: image

image

I have re-checked the DAT and now it doesn't show the Lenovo V130-14IKB as a model to be able to download the drivers again.

Based on that, do you think its unable to find a corresponding driver package so just exits with an error (which isn't logged to the same log?)

I haven't tested OSVersionFallback and haven't actually used it before so would need to research that to ensure i set it up correctly.

I will have a look see if there is any DAT update and attempt to find the correct driver package again and re-add to SCCM.

I'll report back as soon as I have tested.

Thanks again.

merlinfrombelgium commented 4 years ago

Yes make sure to use v6.4.8 of DAT which has a change to support another source for Lenovo drivers. Not saying that's your issue per se. But always recommended to use latest version before troubleshooting further. DAT should notify you of a new version as soon as you start it up.

I would recommend using the ConfigMgr package management from DAT to delete the existing package and create a new one from the models selection.

The OSVersionFallback parameter is a switch. No value needed. It will use another package for that HW SKU if available, for cases where it can't find a package specifically meant for the OS version you're deploying. Just want to rule out if the issue is in matching SKU or OS.

Good luck and let us know.

gossman commented 4 years ago

Morning Merlin,

So I checked DAT I was on 6.4.8. I updated anyway and now see 6.4.8 (Hotfix 3) in the title bar of the GUI.

No matter the selection on DAT e.g. Windows 10, Windows 10 1607, 1909 the Lenovo V130 doesn't appear in the list of available machines.

The drivers do appear to be available via: https://pcsupport.lenovo.com/eg/en/products/laptops-and-netbooks/lenovo-v-series-laptops/v130-14ikb/downloads/driver-list

I will give it a go with the OSVersionFallback and report back.

I'll test with a different model to continue with the testing v4.0.1 of the MDM script and see how that goes for a model that the drivers are available.

Cheers

merlinfrombelgium commented 4 years ago

@gossman parsing the Lenovo driver packages XML, I see no model that resembles 'V130' or '14IKB', which would explain why you don't see it in the DAT. Neither do I, when I search for it. In fact, I don't see any V series listed. Are you sure you didn't create this driver package as a custom package?

@maurice-daly To my knowledge, only Think series are listed and the V series isn't part of those. At least, I can't find a driver pack for it. Can you confirm this?

gossman commented 4 years ago

@merlinfrombelgium I cant say for sure but its very unlikely as I always use DAT to ensure everything stays standardised. It may of been done on a previous version of DAT if that could be where the confusion is from. I don't actually recall every creating a custom package via DAT (but have in SCCM manually).

The OSVersionFallback failed on the Lenovo. The log shows the model and SKU:

And the good news! I tried the process on a Dell 5501 which has an imported driver pack and the process completed without any errors so that's excellent. I was just unfortunate to start with the Lenovo that has its problem with the driver pack.

Hopefully we can identify the driver pack source and ill be able to do some more testing with the Lenovo.

I have around 20 models to test so will report back if there are any problems and likewise if there are not so you have some additional test results available.

Appreciate your help very much :-)

merlinfrombelgium commented 4 years ago

That SKU (81HQ) isn't found at all in the driver catalog. Have a look for yourself: https://download.lenovo.com/cdrt/td/catalogv2.xml

We'll see if @maurice-daly has something to add to this conversation.

Glad to hear it's working well for you otherwise. We all try to improve it together and your feedback helps!

maurice-daly commented 4 years ago

Hi,

The V series isn't something supported directly in the tool, however, as long as a package exists which contains a SKU/model match, then it should select that package during deployment.

Like @merlinfrombelgium says though, I'd suggest this was a custom package. So please send a screenshot of the package properties from the Configmgr console.

Maurice

gossman commented 4 years ago

Hi Guys @merlinfrombelgium @maurice-daly ,

Understood for the Lenovo, thanks for clarifying. If I create the package manually how/what/where do I specify a value to match the SKU? On the DAT tool created Standard Packages I only see the SKU mentioned in the comments section so am unsure how to create it manually.

My woes continue, so I started with another model, this time a HP EliteBook 820 G3 and everything appears good at the beginning but I have ended up in a similar scenario with an error that's not giving me much to work with. Here are the logs from it that machine:

[ApplyDriverPackage]: Apply Driver Package process initiated ApplyDriverPackage 05/08/2020 13:22:40 1680 (0x0690)

The difference to the Lenovo here is that the driver package is definitely created via DAT and for 1909 as can be seen here:

image

Here it can be seen in SCCM: (Note the comment has a matching SKU 807c)

image

Anything you can give me to point me in the right direction I am happy to do some leg work to identify a solution/fix.

Cheers

NickolajA commented 4 years ago

The issue with it crashing as you describe was fixed in 4.0.2 released yesterday, give it a shot and let us know.

gossman commented 4 years ago

@NickolajA

Managed a quick test yesterday and one of the failing models worked with the updated script which is great news.

I will update as I work through different models but so far so good 👍

Cheers

NickolajA commented 4 years ago

Sounds great, thanks for reporting back with an update!

carlosalbaidiada commented 4 years ago

Hi I recently tried with 4.0.2 with several HP models and crashed.

DAT is 4.6.8 version ...

Any help would be appreciated

Thanks a lot

The model is HP Probook 640 G2

Here is the log file ...

[ApplyDriverPackage]: Apply Driver Package process initiated ApplyDriverPackage 20/08/2020 14:05:54 2456 (0x0998)

NickolajA commented 4 years ago

Could you provide the package properties of this package:

[DriverPackage:IHQ00703]: Processing driver package with 4 detection methods: Drivers - Hewlett-Packard ZBook 15u G4 Mobile Workstation - Windows 10 1909 x64

carlosalbaidiada commented 4 years ago

Thanks for your quick response

Here you go

image

gossman commented 4 years ago

@carlosalbaidiada That interesting Carlos as the 640 G2 is one I have successfully tested. The models I have currently tested against are listed below: Dell 5490 Dell 5580 Dell 5280 Dell 5501 Dell 5480 HP 640 G2 HP 820 G3

For the HP 640 G2 my driver package is shown below so you have something to compare against: image

NickolajA commented 4 years ago

There's your problem, Models included is empty. Try to recreate the package, but I'll also look at enhancing the method that verifies the comments field to not only check for a string, but verify it actually contains valid SKUs.

carlosalbaidiada commented 4 years ago

Thanks @NickolajA

I'll try and I let you know.

Thanks @gossman as well for your answer. If it worked for you, something I'm doing wrong for sure.

carlosalbaidiada commented 4 years ago

Hi @NickolajA ,

finally I got to delete the Package with the blank Properties, and it worked. I tried to re-create the package and it was created in blank again ... I'll try to re-create and inform the product code by hand.

I'll let you know

Thanks for your support ¡¡¡

NickolajA commented 4 years ago

Could be that HPs feed is missing this data, we've seen that before unfortunately.

maurice-daly commented 4 years ago

Looks like a change in the XML I need to cater for. The model names are different (again,..)

image

If you enter "828c" as the models included, your package should be good. I'm just finishing a few updates to the DAT, including now catering for this.