MSEndpointMgr / ConfigMgr

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

MSEndpointMgr-Drivermanagement - Error Tasksequenz #291

Open claudiaMCR opened 4 years ago

claudiaMCR commented 4 years ago

Hello,

i want to setup "MSEndpointMgr-Drivermanagement" for SCCM and not able to install driver packages via tasksequenz. Im able to download and import driver packs to my sccm server. The pack i want to test is deployed and i use the Invoke-CMApplyDriverPackage.ps1 version 3.0.5. Inside the tasksequenz i use the command: -URI "http://xxxxx/ConfigMgrWebService/ConfigMgr.asmx" -SecretKey "xxxx" -Filter "Drivers" -DeploymentType BareMetal

The Error is still the same:

The task sequence execution engine failed executing the action (Driver Automation Tool - MSEndpointMgr) in the group (Auto Apply Drivers) with the error code 1 Action output: ... CMApplyDriverPackage.ps1 range 0-114092 Downloaded file from http://xxxxxx:80/SMS_DP_SMSPKG$/HRO007B6/sccm?/Invoke-CMApplyDriverPackage.ps1 to C:_SMSTaskSequence\Packages\HRO007B6\Invoke-CMApplyDriverPackage.ps1 VerifyContentHash: Hash algorithm is 32780 Content successfully downloaded at C:_SMSTaskSequence\Packages\HRO007B6. Resolved source to 'C:_SMSTaskSequence\Packages\HRO007B6' Working dir 'C:_SMSTaskSequence\Packages\HRO007B6' Command line for extension .exe is "%1"%* Set command line: Run PowerShell Script PowerShell command line is NOT shown in the log ('OSDLogPowerShellParameters' is NOT set to 'True') Executing command line: Run PowerShell Script with options (0, 4) Process completed with exit code 1 PowerShell command line returned code 1 ReleaseSource() for C:_SMSTaskSequence\Packages\HRO007B6. reference count 1 for the source C:_SMSTaskSequence\Packages\HRO007B6 before releasing Released the resolved source C:_SMSTaskSequence\Packages\HRO007B6 C. The operating system reported error 1: Incorrect function.

Has anyone some idea how to fix this.

2020-11-26_075817

If i run the powershell script local i get these error:

2020-11-26_093923

Logfile: <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: BareMetal]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[[WebService]: Starting ConfigMgr WebService phase]LOG]!> <![LOG[ - Successfully connected to ConfigMgr WebService at URI: http://xxxxxx/ConfigMgrWebService/ConfigMgr.asmx]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from web service matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling ConfigMgr WebService for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: BareMetal]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[[WebService]: Starting ConfigMgr WebService phase]LOG]!> <![LOG[ - Successfully connected to ConfigMgr WebService at URI: http://xxxxxx/ConfigMgrWebService/ConfigMgr.asmx]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from web service matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling ConfigMgr WebService for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: BareMetal]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[[WebService]: Starting ConfigMgr WebService phase]LOG]!> <![LOG[ - Successfully connected to ConfigMgr WebService at URI: http://xxxxxx/ConfigMgrWebService/ConfigMgr.asmx]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from web service matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling ConfigMgr WebService for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: BareMetal]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[[WebService]: Starting ConfigMgr WebService phase]LOG]!> <![LOG[ - Successfully connected to ConfigMgr WebService at URI: http://xxxxx/ConfigMgrWebService/ConfigMgr.asmx]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from web service matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling ConfigMgr WebService for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: DriverUpdate]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Supported operating system version currently running detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from () matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: DriverUpdate]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Supported operating system version currently running detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from () matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: DriverUpdate]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Supported operating system version currently running detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from () matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: DriverUpdate]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Supported operating system version currently running detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from () matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: BareMetal]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[[WebService]: Starting ConfigMgr WebService phase]LOG]!> <![LOG[ - Successfully connected to ConfigMgr WebService at URI: http://xxxxx/ConfigMgrWebService/ConfigMgr.asmx]LOG]!> <![LOG[ - Retrieved a total of '0' driver packages from web service matching operational mode: Production]LOG]!> <![LOG[ - An error occurred while calling ConfigMgr WebService for a list of available driver packages. Error message: Das Argument ist NULL oder leer. Geben Sie ein Argument an, das nicht NULL oder leer ist, und führen Sie den Befehl erneut aus.]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!>

AsmusRohwer commented 3 years ago

i think you shouldn´t use the BareMetal parameter. For normal installations i use this: -URI "http://FQND/ConfigMgrWebService/ConfigMgr.asmx" -SecretKey "verysecretkey" -Filter "Drivers"

I think you can use BareMetal parameter only if you use AdminService and Version 4 of MDM

claudiaMCR commented 3 years ago

Hello,

if i try this via powershell on some installed client i get this result:

PS C:\temp> .\NEU_Invoke-CMApplyDriverPackage.ps1 -URI "http://xxxx/ConfigMgrWebService/ConfigMgr.asmx" -SecretKey "xxxx" -Filter "Drivers" WARNUNG: Unable to construct Microsoft.SMS.TSEnvironment object Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat. In C:\temp\NEU_Invoke-CMApplyDriverPackage.ps1:257 Zeichen:5

Join-Path : Das Argument kann nicht an den Parameter "Path" gebunden werden, da es NULL ist. In C:\temp\NEU_Invoke-CMApplyDriverPackage.ps1:279 Zeichen:34

WARNUNG: Unable to append log entry to ApplyDriverPackage.log file. Error message at line 304: Das Argument kann nicht an den Parameter "FilePath" geb unden werden, da es NULL ist. Join-Path : Das Argument kann nicht an den Parameter "Path" gebunden werden, da es NULL ist. In C:\temp\NEU_Invoke-CMApplyDriverPackage.ps1:279 Zeichen:34

WARNUNG: Unable to append log entry to ApplyDriverPackage.log file. Error message at line 304: Das Argument kann nicht an den Parameter "FilePath" geb unden werden, da es NULL ist. Join-Path : Das Argument kann nicht an den Parameter "Path" gebunden werden, da es NULL ist. In C:\temp\NEU_Invoke-CMApplyDriverPackage.ps1:279 Zeichen:34

WARNUNG: Unable to append log entry to ApplyDriverPackage.log file. Error message at line 304: Das Argument kann nicht an den Parameter "FilePath" geb unden werden, da es NULL ist. Write-CMLogEntry : Das Argument kann nicht an den Parameter "Path" gebunden werden, da es NULL ist. In C:\temp\NEU_Invoke-CMApplyDriverPackage.ps1:1822 Zeichen:3

claudiaMCR commented 3 years ago

or these error: PS C:\temp> .\Invoke-CMApplyDriverPackage.ps1 -URI "http://xxxx/ConfigMgrWebService/ConfigMgr.asmx" -SecretKey "xxxx" -Filter "Drivers" C:\temp\Invoke-CMApplyDriverPackage.ps1 : Der Parametersatz kann mit den angegebenen benannten Parametern nicht aufgelöst werden.

Cant upload the ps1-files as zip here. But i also try the new version -> same issue: https://github.com/MSEndpointMgr/ModernDriverManagement/commit/753e58dadd8e8b2ab93ef39deb10304167b65289 I want to test it local before i deploy it via tasksequenz.

AsmusRohwer commented 3 years ago

you can use the invoke script in "normal" running windows. The script create TS variables and need the TS environment for that:

WARNUNG: Unable to construct Microsoft.SMS.TSEnvironment object

claudiaMCR commented 3 years ago

hello,

if i use the script inside my standard tasksequenz for deploying operation system i get the following error

The task sequence execution engine failed executing the action (Driver Automation Tool - MSEndpointMgr) in the group (Install operating System) with the error code 1 Action output: ... plyDriverPackage.ps1 range 0-97835 Downloaded file from http://xxxxx:80/SMS_DP_SMSPKG$/HRO007B6/sccm?/NEU_Invoke-CMApplyDriverPackage.ps1 to C:_SMSTaskSequence\Packages\HRO007B6\NEU_Invoke-CMApplyDriverPackage.ps1 VerifyContentHash: Hash algorithm is 32780 Content successfully downloaded at C:_SMSTaskSequence\Packages\HRO007B6. Resolved source to 'C:_SMSTaskSequence\Packages\HRO007B6' Working dir 'C:_SMSTaskSequence\Packages\HRO007B6' Command line for extension .exe is "%1" %* Set command line: Run PowerShell Script PowerShell command line is NOT shown in the log ('OSDLogPowerShellParameters' is NOT set to 'True') Executing command line: Run PowerShell Script with options (0, 4) Process completed with exit code 1 PowerShell command line returned code 1 ReleaseSource() for C:_SMSTaskSequence\Packages\HRO007B6. reference count 1 for the source C:_SMSTaskSequence\Packages\HRO007B6 before releasing Released the resolved source C:_SMSTaskSequence\Packages\HRO007B6. The operating system reported error 1: Incorrect function.

ApplyDriverPackage.log

<![LOG[[ApplyDriverPackage]: Apply Driver Package process initiated]LOG]!> <![LOG[ - Apply driver package deployment type: BareMetal]LOG]!> <![LOG[ - Apply driver package operational mode: Production]LOG]!> <![LOG[[PrerequisiteChecker]: Starting environment prerequisite checker]LOG]!> <![LOG[ - Supported computer platform detected, script execution allowed to continue]LOG]!> <![LOG[ - Computer manufacturer determined as: Hewlett-Packard]LOG]!> <![LOG[ - Computer model determined as: HP EliteBook 840 G4]LOG]!> <![LOG[ - Computer SystemSKU determined as: 828C]LOG]!> <![LOG[ - Computer model detection was successful]LOG]!> <![LOG[ - Computer SystemSKU detection was successful]LOG]!> <![LOG[ - Computer details successfully verified]LOG]!> <![LOG[ - Determined primary computer detection method: SystemSKU]LOG]!> <![LOG[[PrerequisiteChecker]: Completed environment prerequisite checker]LOG]!> <![LOG[[WebService]: Starting ConfigMgr WebService phase]LOG]!> <![LOG[ - Successfully connected to ConfigMgr WebService at URI: http://xxxxx/ConfigMgrWebService/ConfigMgr.asmx]LOG]!> <![LOG[ - Retrieved a total of '7' driver packages from web service matching operational mode: Production]LOG]!> <![LOG[ - Attempting to detect OS Image data from task sequence with PackageID: HRO007C6]LOG]!> <![LOG[ - Target operating system name detected as: Windows 10]LOG]!> <![LOG[ - Target operating system architecture detected as: x64]LOG]!> <![LOG[ - Target operating system build version detected as: 10.0.18362.418]LOG]!> <![LOG[ - Target operating system translated version detected as: 1903]LOG]!> <![LOG[[WebService]: Completed ConfigMgr WebService phase]LOG]!> <![LOG[[DriverPackage]: Starting driver package matching phase]LOG]!> <![LOG[ - Initial count of driver packages before starting filtering process: 7]LOG]!> <![LOG[ - Filtering driver package results to detected computer manufacturer: Hewlett-Packard]LOG]!> <![LOG[ - Count of driver packages after filter processing: 0]LOG]!> <![LOG[ - Filtering driver package results to only include packages that have details added to the description field]LOG]!> <![LOG[ - Count of driver packages after filter processing: 0]LOG]!> <![LOG[[DriverPackage]: Completed driver package matching phase]LOG]!> <![LOG[[DriverPackageValidation]: Starting driver package validation phase]LOG]!> <![LOG[ - Amount of driver packages detected by validation process: 0]LOG]!> <![LOG[ - Validation failed with empty list of matched driver packages, script execution will be terminated]LOG]!> <![LOG[[ApplyDriverPackage]: Apply Driver Package process failed, please refer to previous error or warning messages]LOG]!>