MSEndpointMgr / ConfigMgr

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

SetSystemTime.ps1 failed with error 0x800700A1 #104

Closed ecolint closed 5 years ago

ecolint commented 5 years ago

Hi all,

For some reason, I can't run SetSystemTime.ps1 if I run a TaskSequence directly from PXE. If I run it from Software Center under Windows it works.

The error I get is: "0x800700A1" at SetSystmeTime step.

<![LOG[!--------------------------------------------------------------------------------------------!]LOG]!><time="16:35:15.250-60" date="01-18-2019" component="TSManager" context="" type="1" thread="1704" file="instruction.cxx:760"> <![LOG[Expand a string: WinPEandFullOS]LOG]!><time="16:35:15.250-60" date="01-18-2019" component="TSManager" context="" type="0" thread="1704" file="executionenv.cxx:776"> <![LOG[Executing command line: OSDRunPowerShellScript.exe]LOG]!><time="16:35:15.250-60" date="01-18-2019" component="TSManager" context="" type="1" thread="1704" file="CommandLine.cpp:819"> <![LOG[[ OSDRunPSScript.exe ]]LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="main.cpp:301"> <![LOG[Running powershell script: 'SetSystemTime.ps1'(PkgID: EIG001B1) with execution policy: 'Bypass']LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="main.cpp:331"> <![LOG[The execution scope for running the powershell script is specified not to verify the signature of the scripts. This is unsafe and potentially risk running malicious scripts.]LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="2" thread="1844" file="main.cpp:334"> <![LOG[Sending warning status message]LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="main.cpp:336"> <![LOG[ Setting URL = http://SERVER.DOMAIN, Ports = 80,443, CRL = false]LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="utils.cpp:6943"> <![LOG[ Setting Server Certificates.]LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="utils.cpp:6971"> <![LOG[ Setting Authenticator.]LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="utils.cpp:6978"> <![LOG[ Setting Media Certificate.]LOG]!><time="16:35:15.265-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="utils.cpp:6995"> <![LOG[Sending StatusMessage]LOG]!><time="16:35:15.281-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="libsmsmessaging.cpp:4183"> <![LOG[Setting the authenticator.]LOG]!><time="16:35:15.281-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="libsmsmessaging.cpp:1471"> <![LOG[CLibSMSMessageWinHttpTransport::Send: WinHttpOpenRequest - URL: LFA-ICT-S27.feig-ecolint.org:80 CCM_POST /ccm_system/request]LOG]!><time="16:35:15.281-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="libsmsmessaging.cpp:9266"> <![LOG[Not in SSL]LOG]!><time="16:35:15.281-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="libsmsmessaging.cpp:9411"> <![LOG[Request was successful.]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="libsmsmessaging.cpp:9623"> <![LOG[Powershell path: X:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="main.cpp:155"> <![LOG[ResolveSource flags: 0x00000000]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="resolvesource.cpp:3788"> <![LOG[SMSTSPersistContent: . The content for package EIG001B1 will be persisted]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="resolvesource.cpp:3799"> <![LOG[DownloadOnDemand flag is true. Attempting to download content locally for Package EIG001B1.]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="1" thread="1844" file="resolvesource.cpp:3859"> <![LOG[pszNewPath[0] != L'\0', HRESULT=80070057 (..\path.cpp,469)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="path.cpp:469"> <![LOG[filePath.assign(szDir), HRESULT=80070057 (..\CcmFile.cpp,632)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="CcmFile.cpp:632"> <![LOG[nPos != String::npos, HRESULT=800700a1 (..\path.cpp,101)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="path.cpp:101"> <![LOG[RecursiveCreatePath(sPath.substr(0, nPos), psa), HRESULT=800700a1 (..\path.cpp,104)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="path.cpp:104"> <![LOG[RecursiveCreatePath(sPath.substr(0, nPos), psa), HRESULT=800700a1 (..\path.cpp,104)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="path.cpp:104"> <![LOG[RecursiveCreatePath( sNormalizedPath, psa ), HRESULT=800700a1 (..\path.cpp,159)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="path.cpp:159"> <![LOG[DownloadContentLocally (pszSource, sSourceDirectory, dwFlags, hUserToken, mapNetworkAccess), HRESULT=800700a1 (..\resolvesource.cpp,3860)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="resolvesource.cpp:3860"> <![LOG[TS::Utility::ResolveSource(sPkgID.c_str(), sPath), HRESULT=800700a1 (main.cpp,160)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="main.cpp:160"> <![LOG[Failed to resolve the source for SMS PKGID=EIG001B1, hr=0x800700a1]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="3" thread="1844" file="main.cpp:160"> <![LOG[ExecutePowerShellScript(sScriptName, sParameters, sPackageID, sExecutionPolicy, dwPSRunExitCode), HRESULT=800700a1 (main.cpp,343)]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="0" thread="1844" file="main.cpp:343"> <![LOG[Run powershell script failed to run, hr=0x800700a1]LOG]!><time="16:35:15.297-60" date="01-18-2019" component="RunPowerShellScript" context="" type="3" thread="1844" file="main.cpp:343"> <![LOG[Process completed with exit code 2147942561]LOG]!><time="16:35:15.312-60" date="01-18-2019" component="TSManager" context="" type="1" thread="1704" file="CommandLine.cpp:1115"> <![LOG[!--------------------------------------------------------------------------------------------!]LOG]!><time="16:35:15.312-60" date="01-18-2019" component="TSManager" context="" type="1" thread="1704" file="instruction.cxx:814"> <![LOG[Failed to run the action: Set OSD SystemTime. The specified path is invalid. (Error: 800700A1; Source: Windows)]LOG]!><time="16:35:15.312-60" date="01-18-2019" component="TSManager" context="" type="3" thread="1704" file="instruction.cxx:921">

If I run the TS through Software Center, then in PXE it works, I can have the start and elapsed time.

ecolint commented 5 years ago

I found that it fails because BitLocker is enabled during PXE!