maurice-daly / DriverAutomationTool

Home of the Driver Automation Tool
https://www.msendpointmgr.com
BSD 2-Clause "Simplified" License
382 stars 114 forks source link

OSDDownloadContent.exe failing with latest script #394

Open shaikh441 opened 1 year ago

shaikh441 commented 1 year ago

Hi, We currently have a very odd issue in our environment. We are using v4.2.0 (latest) of the script and have noticed we are getting failures in the Task Sequence when the script tries to download the package files using OSDDownloadContent.exe. However, after the initial failure, if the machine is tried again then the script works successfully!

The packages are correctly distributed to all our DP's and have been re-done since the issue started. I have attached the point in the log where it fails to download and oddly, the second time it runs it succeeds.

Running module version 5.0.9078.1000 from location 'X:\sms\bin\x64\OSDDownloadContent.exe' RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) OSDDownloadDownloadPackages = CV10079C RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) OSDDownloadDestinationLocationType = Custom RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) OSDDownloadContinueDownloadOnError = 0 RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Packages will be downloaded to custom download location: 'C:\_SMSTaskSequence\DriverPackage' RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Getting package content: CV10079C, version: 0 RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) GetPackageContent: RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Resolving content for SMS Package CV10079C RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Site Code CV1 RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) MP <our_MP> RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) TSPkgVar _SMSTSCV10079C RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) RunFromDPEnabled false RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Resolving local content for CV10079C:0 RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) spCacheMgr.createInstance(CLSID_ContentCacheManager, CLSCTX_LOCAL_SERVER), HRESULT=80040154 (X:\bt\1116398\repo\src\Framework\TSCore\resolvesource.cpp,4646) RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Setting URL = <our_MP>, Ports = 80,443, CRL = false RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Setting Server Certificates. RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Setting Authenticator. RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) ::DecompressBuffer(65536) RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Decompression (zlib) succeeded: original size 4777, uncompressed size 5027. RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Creating CCMCertStore RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Failed to create instance of of ICacheManager. Is ccmexec running?, hr=0x80040154 RunPowerShellScript 09/09/2022 05:36:04 180 (0x00B4) Signing Certificate is not available in the store OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) CCMRetrieveCertificateContext failed : 0x87d00215 OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) CCMRetrieveCertificateContext(eType, ppTmpContext), HRESULT=87d00215 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\ccmgencert.cpp,3416) OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) CCMGetCurrentCertificateContext(eCertMsgAuthSignature, ppCertContext), HRESULT=87d00215 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\ccmgencert.cpp,3473) OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) Signing certificate context not found. Importing client identity OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) No duplicate signing/encryption certifcates detected. OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) Signing Certificate is not available in the store RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) CCMRetrieveCertificateContext(eType, ppTmpContext), HRESULT=87d00215 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\ccmgencert.cpp,3416) RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) CCMGetCurrentCertificateContext(eCertMsgAuthSignature, ppCertContext), HRESULT=87d00215 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\ccmgencert.cpp,3473) RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) Signing certificate context not found. Importing client identity RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) No duplicate signing/encryption certifcates detected. RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) CCMRetrieveCertificateContext failed : 0x87d00215 RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) Signing Certificate is not available in the store OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) CCMRetrieveCertificateContext failed : 0x87d00215 OSDDownloadContent 09/09/2022 05:36:05 1424 (0x0590) Signing Certificate is not available in the store RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) CCMRetrieveCertificateContext failed : 0x87d00215 RunPowerShellScript 09/09/2022 05:36:05 180 (0x00B4) Encryption Certificate is not available in the store OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) CCMRetrieveCertificateContext failed : 0x87d00215 OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Unable to open TPM key provider (0xc0000225). TPM not available. OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Key ConfigMgrPrimaryKey not found in provider Microsoft Software Key Storage Provider OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Key ConfigMgrMigrationKey not found in provider Microsoft Software Key Storage Provider OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) NCrypt::NCryptSetProperty( hKey, BCRYPT_RSAFULLPRIVATE_BLOB, pbKeyBlob, cbKeyBlob, 0 ), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\KSPUtils.cpp,1887) OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Failed to import the key pair, 0x80090005 OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) ImportFullKeyPair(hProvSoft, L"ConfigMgrPrimaryKey", pbKeyBlob, cbKeyBlob), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\KSPUtils.cpp,1036) OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) KSP::ImportKeyPairFromMigration(szFullKeyBlob), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\ccmgencert.cpp,6668) OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) CCM::Authentication::CcmImportIdentityFromMigration((LPCWSTR)clientIdentityBuffer.getBuffer()), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\TSCore\utils.cpp,7437) OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) CcmImportIdentityFromMigration failed to import client identity. OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) PrepareTransportEx() failed. 0x80090005. OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) TS::Utility::PrepareTransport(oHttpTransport), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\TSCore\resolvesource.cpp,4788) OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Failed to download content for SMS package CV10079C, hr=0x80090005 OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Failed to resolve the source for Package: CV10079C, hr=0x80090005 OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Failed to download package CV10079C, cannot continue (0x80090005) OSDDownloadContent 09/09/2022 05:36:06 1424 (0x0590) Encryption Certificate is not available in the store RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Unable to open TPM key provider (0xc0000225). TPM not available. RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Key ConfigMgrPrimaryKey not found in provider Microsoft Software Key Storage Provider RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Key ConfigMgrMigrationKey not found in provider Microsoft Software Key Storage Provider RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) NCrypt::NCryptSetProperty( hKey, BCRYPT_RSAFULLPRIVATE_BLOB, pbKeyBlob, cbKeyBlob, 0 ), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\KSPUtils.cpp,1887) RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) ImportFullKeyPair(hProvSoft, L"ConfigMgrPrimaryKey", pbKeyBlob, cbKeyBlob), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\KSPUtils.cpp,1036) RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) KSP::ImportKeyPairFromMigration(szFullKeyBlob), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\security\MsgAuth\CCMGenCert\ccmgencert.cpp,6668) RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) CCM::Authentication::CcmImportIdentityFromMigration((LPCWSTR)clientIdentityBuffer.getBuffer()), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\TSCore\utils.cpp,7437) RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) TS::Utility::PrepareTransport(oHttpTransport), HRESULT=80090005 (X:\bt\1116398\repo\src\Framework\TSCore\resolvesource.cpp,4788) RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) CCMRetrieveCertificateContext failed : 0x87d00215 RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Failed to import the key pair, 0x80090005 RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) CcmImportIdentityFromMigration failed to import client identity. RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) PrepareTransportEx() failed. 0x80090005. RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Failed to download content for SMS package CV10079C, hr=0x80090005 RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Failed to resolve the source for Package: CV10079C, hr=0x80090005 RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Failed to download package CV10079C, cannot continue (0x80090005) RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Process completed with exit code 1 RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) PowerShell command line returned code 1 RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) ReleaseSource() for C:\_SMSTaskSequence\Packages\CV1004EA. RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) reference count 1 for the source C:\_SMSTaskSequence\Packages\CV1004EA before releasing RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Released the resolved source C:\_SMSTaskSequence\Packages\CV1004EA RunPowerShellScript 09/09/2022 05:36:06 180 (0x00B4) Process completed with exit code 1 TSManager 09/09/2022 05:36:06 1700 (0x06A4) !--------------------------------------------------------------------------------------------! TSManager 09/09/2022 05:36:06 1700 (0x06A4) Failed to run the action: Apply Drivers (21H2). Error 1 TSManager 09/09/2022 05:36:06 1700 (0x06A4)

Can anyone figure what could be causing this based on the above log? Any assistance would be appreciated!

Note - I have changed anywhere where it referenced our management point to

Jtracy-ItPro commented 1 year ago

We're having the same problem. It only happens on task sequences running through the Software Center, not PxeBoot. We also ran the raw OSDDownloadContent.exe commands and saw the same result (sidestepping the script).