MSEndpointMgr / ConfigMgr

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

Invoke-CMApplyDriverPackage.ps1 Exit Code 9 #105

Closed ronmanp closed 4 years ago

ronmanp commented 5 years ago

Hi, first of all thank you for this amazing tool. I'm just starting to use it so I'm probably missing something here.

Here's my setup:

Status Message from computer:

The task sequence execution engine failed executing the action (Dynamically Apply Drivers) in the group (Modern Driver Management) with the error code 9
Action output: ... .
In SSL, but with no client cert
In SSL, but with no media cert
Powershell path: X:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe
ResolveSource flags: 0x00000000
SMSTSPersistContent: . The content for package EUR006F2 will be persistedLocations: Multicast = 0, HTTP = 1, SMB = 0.
Multicast is not enabled for the package.
Trying https://xxxxxxxxxxxxxxx/NOCERT_SMS_DP_SMSPKG$/EUR006F2.
WinHttp credentials set
In SSSL - but not using DP auth token or authenticator
In SSL, but withno client cert
List of files to be downloaded
Downloaded file from http://xxxxxxxxxxxxxxx:443/NOCERT_SMS_DP_SMSPKG$/EUR006F2/sccm?/Invoke-CMApplyDriverPackage.ps1 to C:\_SMSTaskSequence\Packages\EUR006F2\Invoke-CMApplyDriverPackage.ps1 
VerifyContentHash: Hash algorithm is 32780
Resolved source to 'C:\_SMSTaskSequence\Packages\EUR006F2'
Working dir 'C:\_SMSTaskSequence\Packages\EUR006F2'
Executing command line: Run Powershell script
Process completed with exit code 9
Command line returned 9. The operating system reported error 9: The storage control block address is invalid.
NickolajA commented 5 years ago

This is the proper error message that you're getting:

"Computer model detection logic failed for all detected driver packages"

Could you attach the ApplyDriverPackage.log from that device model?

ronmanp commented 5 years ago

Ok, just noticed that it thinks the image is Windows 7... I only have one package for this model and it's Windows 10 x64. Boot image is WinPE 1803 x64 and the image I'm applying is Windows 10 1803 x64. Log file below:

<![LOG[===== SCConfigMgr Invoke-CMApplyDriverPackage Version 2.1.5 ====]LOG]!> <![LOG[Driver download package process initiated]LOG]!> <![LOG[Manufacturer determined as: Dell]LOG]!> <![LOG[Computer model determined as: Precision 3930 Rack]LOG]!> <![LOG[Computer SKU determined as: 0873]LOG]!> <![LOG[Fallback SKU determined as: 0873]LOG]!> <![LOG[Retrieved a total of 2 driver packages from web service]LOG]!> <![LOG[Attempting to detect OS Image data from task sequence, running in DeploymentType: BareMetal]LOG]!> <![LOG[Translated OSName from OSImageVersion: Windows 7]LOG]!> <![LOG[Translated OSImageArchitecture: x64]LOG]!> <![LOG[Using computer detection method: SystemSKU]LOG]!> <![LOG[Attempting to find a match for driver package: Drivers - Dell Precision 3930 Rack - Windows 10 x64 (EUR006F1)]LOG]!> <![LOG[Match found for computer model using detection method: SystemSKU and SKU value (0873)]LOG]!> <![LOG[Driver package does not meet computer model, manufacturer and operating system and architecture criteria: Drivers - Dell Precision 3930 Rack - Windows 10 x64 (EUR006F1)]LOG]!> <![LOG[Computer model detection logic failed for all detected driver packages]LOG]!>

NickolajA commented 5 years ago

I've actually never understood why it detects that as Windows 7 when it comes back from the web service. It's been reported before but I can't reproduce it unfortunately.

NickolajA commented 5 years ago

What if you run the methods manually that gets the image data from the web service?