Task sequence has failed with the error code 0x80004005

The task sequence may fail together with the «80004005» error code when you deploy a software package to a client computer from a System Center Configuration Manager 2007 SP2 site server Symptoms Consider the following scenario: You create a software package on a System Center Configuration Manager 2007 Service Pack 2 (SP2) site server. […]

Содержание

  1. The task sequence may fail together with the «80004005» error code when you deploy a software package to a client computer from a System Center Configuration Manager 2007 SP2 site server
  2. Symptoms
  3. Cause
  4. Resolution
  5. Workaround
  6. Status
  7. More Information
  8. Типовые ошибки при установке Windows через SCCM
  9. Exit win32 codes — коды ошибок в task sequence
  10. Как собирать логи SCCM / MDT
  11. Чем читать логи
  12. The task sequence may fail together with the «80004005» error code when you deploy a software package to a client computer from a System Center Configuration Manager 2007 SP2 site server
  13. Symptoms
  14. Cause
  15. Resolution
  16. Workaround
  17. Status
  18. More Information
  19. Task sequence has failed with the error code 0x80004005
  20. Вопрос
  21. Ответы
  22. Все ответы

The task sequence may fail together with the «80004005» error code when you deploy a software package to a client computer from a System Center Configuration Manager 2007 SP2 site server

Symptoms

Consider the following scenario:

You create a software package on a System Center Configuration Manager 2007 Service Pack 2 (SP2) site server.

The package includes files that contain extended ASCII characters in the file names.

You advertise a task sequence to deploy the package to a client computer.

You select the Download content locally when needed by running task sequence option on the Distribution Points tab of the advertisement properties.

In this scenario, the task sequence may fail together with the «80004005» error code. Additionally, the following error message is logged in the Smsts.log file on the client computer:

Hash Value failed or hash value is incorrect

Cause

This issue occurs because the extended ASCII characters in the file names are not downloaded or named correctly and because the file names differ from the original files names. Therefore, the hash mismatch error occurs.

Resolution

The hotfix for this issue is integrated into hotfix 2276865. To resolve this issue, install hotfix 2276865 on the affected System Center Configuration Manager 2007 SP2 site server.

2276865 The «Date modified» attribute for each file is changed after you deploy the files to a client computer by advertising a task sequence from a System Center Configuration Manager 2007 SP2 site server

Workaround

To work around this issue, use one of the following methods:

Rename these files to remove extended ASCII characters, re-create the package, and then deploy the package to the client computer again.

Select the Download all contents locally before starting task sequence option on the Distribution Points tab of the advertisement properties.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Источник

Типовые ошибки при установке Windows через SCCM

В этой статье мы расскажем, как легко и эффективно траблшутить установку Windows, выполняемую через System Center Configuration Manager (SCCM) или с помощью MDT.

Итак, мы рассматриваем ситуацию, когда выполняется task sequence, запущенный с SCCM сервера или из MDT, интегрированной с WDS. Существенной разницы нет, ведь exit коды фактически у них одинаковые для стандартных типовых шагов. также соверщенно не важно, загружали ли вы клиента с PXE или через Boot media (загрузочную срезу на USB или DVD), главное, чтобы вы попали в среду Windows PE и могли там выбрать нужный task sequence.

Exit win32 codes — коды ошибок в task sequence

Итак, представим себе, что вы успешно запустили task sequence и через некотрое время получили окно с кодом ошибки. Вот типовые коды:

0x80070070 — «There is not enough space on the disk.» На диске нет достаточно места. Такое встречается, когда диск не обнаружен или не является disk 0 на SATA контроллере (нельзя установить ОС на disk 1 и т.д.) или когда в компьютер вставлены другие носители (флэшки, внешние диски). Также такое встречается, когда структура разделов на диске не соотвествует утанавливаемой ОС: например, диск разбит в MBR, а вы ставите в GPT. Это типовая ситуация, когда вы устанавливаете Windows 10 в UEFI (со структурой разделов GPT) после того, как на этом диске стояла Windows 7 в Legacy mode (структура разделов MBR). И самый последний возможный случай — когда на диске есть скрытые или зашифрованные разделы (например с помощью Bitlocker). Во всех случаях диск необходимо очистить от разделов с помощью утилиты diskpart.
Очистка выполняется следующими командами в окне cmd:

diskpart
select disk 0
clean
exit

0x80070490 — «Invalid disk number specified». «System partition is not defined». Failed to identify HDD, failed to identify existing partitions on the HDD, failed to find driver for PCIVEN device. Типовая ошибка, когда Windows PE не может определить наличие диска на контроллере, разделов на нем, часто в случае неправильной настройки в BIOS или в следствие того, что ваш загрузочный образ Windows PE просто не содержит нужных драйверов для вашего контроллера диска. Напомню, что необходимо добавлять драйвера контроллеров в загрузочный образ через утилиту DISM, когда вы переходите с одной платформы на другую.

0x80070032 — «The active system partition on a MBR system must be NTFS». Существующая файловая система или разбиение диска не NTFS. Диск необходимо очистить от разделов с помощью утилиты diskpart.

0x80070570 — «An error occurred while starting task sequence». «The file or directory is corrupted and unreadable.» Эта ошибка может как означать повреждение самого диска или файловой системы, так и исходных файлов пакетов, которые вы ставите на диск. Также эта ошибка встречается, когда компьютер некорректно выключен и Windows хочет проверить диск на ошибки при следующей загрузке.

0x80070057 — «Format failed». Утилита для форматирования диска. встроенная в MDT, не может отформатировать диск. Чаще всего из-за того, что диск не определяется или не подключен как disk 0 в системе.

0x80070002 — «The system cannot find the file specified». Если установка происходит с SCCM, то это означает, что пакет не удалось успешно скачать с сервера, в остальных случаях — в пакете установки программы используется неверный путь или отсуствуют какие-то файлы.

0x80004005 — «An error occurred while retrieving policy for this computer». Эта ошибка может иметь за собой массу различных причин, потому что 4005 — это generic code, означающий, что операция не может быть выполнена. Но если она встречается в самом начале до выбора task sequence для исполнения и сопровожается текстом ошибки «An error occurred while retrieving policy for this computer», то это происходит, когда клиент не может получить список task sequence с SCCM сервера. Причина тому — неправильное время, установленное на клиете или сетевая ошибка. Также, это может быть следствием того, что сертификат в загрузочном образе (boot image) и сертификат на Management point сервере SCCM отличаются.
Поясню механизм, как это работает. Ваш загрузочный образ должен содержать всю неободимую информацию для подключения к серверам SCCM (прописывается в конфигурационном файле MDT). Затем, при загрузке Windows PE исполняется необходимая последовательность команд, в частности подключение к Management Point, откуда клиент должен забрать список доступных Task sequences. В этот момент ко всему прочему проверяется время на клиенте и на сервере, если они отличаются, сервер ответит отказом. Равно как и в случае неподходящего сертификата.

В остальных случаях 0x80004005 просто означает неудачное выполнение операции. Чтобы узнать детали, что именно было не выполенно, необходимо изучать логи SCCM.

Как собирать логи SCCM / MDT

MDT создает следующие лог-файлы:

  • BDD.log. Это файл-агрегатор, который содержит результаты основных шагов task sequence.
  • dism.log— лог, создаваемый командой DISM, когда та используется для конфигурирования установленной Windows (в первую очередь при unattended установке драйверов)
  • LiteTouch.log.Этот файл создается, если вы используете LTI деплойменты. По умолчанию располагается в %WINDIR%TEMPDeploymentLogs.
  • NetSetup.LOG— файл содержит сетевую информация о добавлении компьютера в домен.
  • Scriptname.log. Такие файлы создаются каждым MDT скриптом согласно его имени.
  • SMSTS.log.Это главный файл. создаваемый самим секвенсором (исполнителем Task sequence). Этот файл описывает все шаги Task sequence, по окончании каждого шага выводит exit win32 code, с которым он завершился. По умолчанию, этот файл имеет размер 2 Мбайт. Если общий размер лога превышает этот размер, то создается второй, третий и т.д. файлы, начинающиеся на smsts*. Файл может располагаться в %TEMP%, %WINDIR%System32ccmlogs, or C:_SMSTaskSequence, or C:SMSTSLog в зависимости от типа установки (MDT, SCCM, с SCCM килентом или без) и от этапа, на котром сейчас находится установка ОС.
  • Wizard.log.Мастер установки MDT создает этот файл.
  • WPEinit.log.Этот файл создается Windows PE при его инициализации и полезен при траблшутинге самого Windows PE.
  • zticonfigure.log— содержит информацию о конфигурировании кастомных настроек Windows, которые вы указали в конфигурации MDT (чаще всего это региональная локализация). Создается при ZTI деплойментах с SCCM.
  • ztigroups.log— содержит информацию о добавлении групп в локальные администраторы на компьютере, если таковые были указаны в настройках MDT. Создается при ZTI деплойментах с SCCM.

В конце выполнения task sequence все логи копируются в папку, указанную в свойстве SLShare файле настроек MDT Customsettings.ini file. Если вы указали сетевой путь, то сетевой ресурс должен быть доступен для этого.

Дополнительно, сама Windows создает два полезных файла в папке C:WindowsPantherUnattendGCsetupact.log и setuperr.log. С помощью них вы можете найти ошибки во время конфигурирования Windows и добавления компьютера в домен.

Расположение логов меняется в зависимости от того, какой тип установки вы используете (LTI, ZTI, с SCCM или без). Но в общем случае порядок их поиска таков:

  1. На стадии начала работы Windows PE до запуска task sequence логи находятся в X:windowstempsmstslog
  2. После запуска task sequence в Windows PE, во время форматирования диска и прочих сервисных операций Windows PE — в X:MININTSMSOSDOSDLOGS
  3. После форматирования диска и во время применения образа на диск — на локальном диске C: или D: (в зависимости от того, как вы форматировали диск): C:_SMSTaskSequenceLogs и C:SMSTSLog
  4. После установки SCCM клиента, если такая есть в вашем task sequence логи будут сохраняться в C:WindowsCCMLogs, потому что с этого момента SCCM клиент управляет установкой программ.
  5. В папке %WINDIR%TEMPDeploymentLogs будут храниться логи, если вы использовали LTI установку через MDT без SCCM.

Чем читать логи

Программой Cmtrace. Она вохдит в состав пакет System Center 2012 R2 Configuration Manager Toolkit в виде самостоятельной утилиты. Я рекомендую встроить ее в ваш загрузочный образ. Чтобы прочитать логи в Windows PE, нажмите F8, появится окно cmd, где вы можете или вызвать cmtrace или explorer.

Источник

The task sequence may fail together with the «80004005» error code when you deploy a software package to a client computer from a System Center Configuration Manager 2007 SP2 site server

Symptoms

Consider the following scenario:

You create a software package on a System Center Configuration Manager 2007 Service Pack 2 (SP2) site server.

The package includes files that contain extended ASCII characters in the file names.

You advertise a task sequence to deploy the package to a client computer.

You select the Download content locally when needed by running task sequence option on the Distribution Points tab of the advertisement properties.

In this scenario, the task sequence may fail together with the «80004005» error code. Additionally, the following error message is logged in the Smsts.log file on the client computer:

Hash Value failed or hash value is incorrect

Cause

This issue occurs because the extended ASCII characters in the file names are not downloaded or named correctly and because the file names differ from the original files names. Therefore, the hash mismatch error occurs.

Resolution

The hotfix for this issue is integrated into hotfix 2276865. To resolve this issue, install hotfix 2276865 on the affected System Center Configuration Manager 2007 SP2 site server.

2276865 The «Date modified» attribute for each file is changed after you deploy the files to a client computer by advertising a task sequence from a System Center Configuration Manager 2007 SP2 site server

Workaround

To work around this issue, use one of the following methods:

Rename these files to remove extended ASCII characters, re-create the package, and then deploy the package to the client computer again.

Select the Download all contents locally before starting task sequence option on the Distribution Points tab of the advertisement properties.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Источник

Task sequence has failed with the error code 0x80004005

Вопрос

I’m fighting already two weeks with this issue and no success. I tried many instructions and configured as described by others but I’m running always into the error as shown below:

Task Sequence «xxxxx» has failed with the error code 0x80004005 in the task sequence step «Apply Operating System».
I have checked all sites with solutions, but still getting this error.

Here is my task sequence, specially the partitioning and applying the OS and data image:

I’m «fighting» with this already 2 weeks, every day. Then suddenly it’s working, but then getting an error for the data image, see:

Maybe someone knows the correct config for the partition, or where I have done a mistake.

Ответы

We solved now this issue by switching within the BIOS settings from UEFI to Legacy.

Now everything is fine.

Thanks for you help!

Все ответы

Thanks for posting in TechNet.

The error code 0x80004005 is a general error that means something is wrong with SCCM. And the error code 0x80070057 means «The parameter is incorrect».

1.Thus, as with all task sequence issues and troubleshooting, it’s recommended to examine the smsts.log on the target system. Please refer to the following article to export the smsts.log to troubleshoot the task sequence error:
SCCM: How to copy SMSTS.log when a Task Sequence fails

2.Based on my experience, the reason for the problem is that there is no redundant partition for the Data Image. According to the error code and screenshots, there are only two partitions in the Partition Disk 0 task sequence step: one is recovery partition (500M), the other one is for OS (100% of remaining space on disk). There is no other partition for the Apply Data Image task sequence step, so please help remove the Apply Data Image step or increase the third partition with enough space in the Partition Disk 0 step to have a try.

Thanks for your time.

Best regards,
Simon

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

In the SMSTS.logs, I have the following errors:

User did not specify local data drive TSManager 08/11/2019 03:51:21 1824 (0x0720)
Volume C: has 353058816 bytes of free space TSManager 08/11/2019 03:51:21 1824 (0x0720)
Volume C: is not bootable TSManager 08/11/2019 03:51:21 1824 (0x0720)
Volume D: has 126288609280 bytes of free space TSManager 08/11/2019 03:51:21 1824 (0x0720)
Volume D: is not bootable TSManager 08/11/2019 03:51:21 1824 (0x0720)
Volume E: has 1260539904 bytes of free space TSManager 08/11/2019 03:51:21 1824 (0x0720)
Volume E: is not bootable TSManager 08/11/2019 03:51:21 1824 (0x0720)
Volume X: is not a fixed hard drive TSManager 08/11/2019 03:51:21 1824 (0x0720)
TSM root drive = TSManager 08/11/2019 03:51:21 1824 (0x0720)
We do not find an available volume to store the local data path TSManager 08/11/2019 03:51:21 1824 (0x0720)
Set a global environment variable _SMSTSNextInstructionPointer=1 TSManager 08/11/2019 03:51:21 1824 (0x0720)
Set a TS execution environment variable _SMSTSNextInstructionPointer=1 TSManager 08/11/2019 03:51:21 1824 (0x0720)
Set a global environment variable _SMSTSInstructionStackString=0 TSManager 08/11/2019 03:51:21 1824 (0x0720)
Set a TS execution environment variable _SMSTSInstructionStackString=0 TSManager 08/11/2019 03:51:21 1824 (0x0720)
Save the current environment block TSManager 08/11/2019 03:51:21 1824 (0x0720)
pszPath[0] != L’′, HRESULT=80070057 (..path.cpp,60) TSManager 08/11/2019 03:51:21 1824 (0x0720)
Filesystem::Path::Add(sEnvPath, EnvDataFileName, sEnvPath), HRESULT=80070057 (..environmentlib.cpp,726) TSManager 08/11/2019 03:51:21 1824 (0x0720)
Failed to save environment to (80070057) TSManager 08/11/2019 03:51:21 1824 (0x0720)
TS::Environment::SharedEnvironment.saveEnvironment(szPath), HRESULT=80070057 (executionenv.cxx,844) TSManager 08/11/2019 03:51:21 1824 (0x0720)
Failed to save the current environment block. This is usually caused by a problem with the program. Please check the Microsoft Knowledge Base to determine if this is a known issue or contact Microsoft Support Services for further assistance.
The parameter is incorrect. (Error: 80070057; Source: Windows) TSManager 08/11/2019 03:51:21 1824 (0x0720)
SaveEnvironment(), HRESULT=80070057 (executionenv.cxx,424) TSManager 08/11/2019 03:51:21 1824 (0x0720)
Failed to persist execution state. Error 0x(80070057) TSManager 08/11/2019 03:51:21 1824 (0x0720)
Failed to save execution state and environment to local hard disk TSManager 08/11/2019 03:51:21 1824 (0x0720)

Thanks for your reply. May we know which type of device you are imaging, BIOS or UEFI?

Источник

Symptoms

Consider the following scenario:

  • You create a software package on a System Center Configuration Manager 2007 Service Pack 2 (SP2) site server.

  • The package includes files that contain extended ASCII characters in the file names.

  • You advertise a task sequence to deploy the package to a client computer.

  • You select the Download content locally when needed by running task sequence option on the Distribution Points tab of the advertisement properties.

In this scenario, the task sequence may fail together with the «80004005» error code. Additionally, the following error message is logged in the Smsts.log file on the client computer:

Hash Value failed or hash value is incorrect

Cause

This issue occurs because the extended ASCII characters in the file names are not downloaded or named correctly and because the file names differ from the original files names. Therefore, the hash mismatch error occurs.

Resolution

The hotfix for this issue is integrated into hotfix 2276865. To resolve this issue, install hotfix 2276865 on the affected System Center Configuration Manager 2007 SP2 site server.

2276865 The «Date modified» attribute for each file is changed after you deploy the files to a client computer by advertising a task sequence from a System Center Configuration Manager 2007 SP2 site server

Workaround

To work around this issue, use one of the following methods:

  • Rename these files to remove extended ASCII characters, re-create the package, and then deploy the package to the client computer again.

  • Select the Download all contents locally before starting task sequence option on the Distribution Points tab of the advertisement properties.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Need more help?

Let’s see how you can FIX SCCM Task Sequence Error 0x80004005. You might encounter a prompt message An error occurred while retrieving policy for this computer during Operating System Deployment with SCCM Task Sequence.

The Task Sequence Error 0x80004005 is generic, and the solution could be different based on the details you get into logs.

We onboarded a new hardware model directly to the Configuration Manager with a MAC address in this scenario. We added a newly imported computer to a collection for deploying operating systems to the computer. After initiating the deployment, at the initial stage, it gets failed with the task sequence Error 0x80004005.

It’s always recommended to examine the SMSTS log for task sequence failure issues to help you get the inside about the failure prompt to troubleshoot the task sequence error 0x80004005. We have a lot of coverage related to OSD troubleshooting within HTMD community posts.

Patch My PC

  • FIX: SCCM Task sequence has failed with the error code 0x80070057
  • Easily FIX SCCM Task Sequence Unable to find a volume Error Code 0x80070490
  • Deploy Microsoft Edge WebView2 Using SCCM ConfigMgr

Issue Summary

This error appears at the initial stage when you have started the deployment. Task Sequence fails with the following error message –

An error occurred while retrieving policy for this computer (0x80004005). For more information, contact your system administrator or helpdesk operator.

FIX: SCCM Task Sequence Error 0x80004005 Failed to Run
FIX: SCCM Task Sequence Error 0x80004005 Failed to Run

In this scenario, Task Sequence terminated at the beginning. You will collect the logs at WinPE x:windowstempsmstslogsmsts.log. To get the command prompt window, you have to press F8 key.

More you can explore SCCM OSD Task Sequence Troubleshooting Steps by Step Ultimate Guide SMSTS.log. Here’s the highlight from the SMSTS.log –

Adaptiva

  • Error. Status code 404 – (Not Found)
  • Decoding failed (0x8009310b). Assuming not encoded.
  • BOM not found on policy reply
  • Failed to download policy AP32080B-AP300A0E-6F6BCC28 (Code 0x80004005).

FIX: SCCM Task Sequence Error 0x80004005 Failed to Run

FIX: SCCM Task Sequence Error 0x80004005 Failed to Run
<![LOG[Error. Status code 404 - (Not Found) returned]LOG]!><time="16:19:15.950-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="libsmsmessaging.cpp:10121">
<![LOG[Found a secure policy.]LOG]!><time="16:19:15.950-480" date="08-24-2021" component="TSMBootstrap" context="" type="1" thread="1612" file="libsmsmessaging.cpp:5186">
<![LOG[Trying to decode policy.]LOG]!><time="16:19:15.950-480" date="08-24-2021" component="TSMBootstrap" context="" type="1" thread="1612" file="libsmsmessaging.cpp:5188">
<![LOG[CryptDecryptMessage ( &DecryptParams, pbEncrypted, nEncryptedSize, 0, &nPlainSize, 0 ), HRESULT=8009310b (..windes.cpp,451)]LOG]!><time="16:19:15.950-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="windes.cpp:451">
<![LOG[Decoding failed (0x8009310b). Assuming not encoded.]LOG]!><time="16:19:15.950-480" date="08-24-2021" component="TSMBootstrap" context="" type="1" thread="1612" file="libsmsmessaging.cpp:5208">
<![LOG[BOM not found on policy reply]LOG]!><time="16:19:15.950-480" date="08-24-2021" component="TSMBootstrap" context="" type="2" thread="1612" file="libsmsmessaging.cpp:5351">
<![LOG[hr, HRESULT=80004005 (..libsmsmessaging.cpp,5373)]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="libsmsmessaging.cpp:5373">
<![LOG[oPolicy.RequestPolicy((GetPolicyFlags() & POLICY_SECURE) != 0, (GetPolicyFlags() & POLICY_COMPRESS) != 0), HRESULT=80004005 (..tspolicy.cpp,2577)]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="tspolicy.cpp:2577">
<![LOG[Failed to download policy AP32080B-AP300A0E-6F6BCC28 (Code 0x80004005).]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="3" thread="1612" file="tspolicy.cpp:2577">
<![LOG[(*iTSPolicyAssignment)->GetObjects(pszClassName, aTSPolicyObjectArray ), HRESULT=80004005 (..tspolicy.cpp,1574)]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="tspolicy.cpp:1574">
<![LOG[m_pPolicyManager->GetObjects( TS::Policy::TaskSequence::GetClassName(), TS::Policy::TaskSequence::GetPolicyCategory(), TS::Policy::TSPolicyAssignment::POLICY_TS_FOR_CD_AND_PXE, aTSPolicyObjectArray ), HRESULT=80004005 (tsmediawizardcontrol.cpp,1196)]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="tsmediawizardcontrol.cpp:1196">
<![LOG[Failed to get all CCM_TaskSequence objects]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="3" thread="1612" file="tsmediawizardcontrol.cpp:1196">
<![LOG[Exiting TSMediaWizardControl::GetPolicy.]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="tsmediawizardcontrol.cpp:1455">
<![LOG[pWelcomePage->m_pTSMediaWizardControl->GetPolicy(), HRESULT=80004005 (tsmediawelcomepage.cpp,304)]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1612" file="tsmediawelcomepage.cpp:304">
<![LOG[Setting wizard error: An error occurred while retrieving policy for this computer  (0x80004005). For more information, contact your system administrator or helpdesk operator.]LOG]!><time="16:19:26.970-480" date="08-24-2021" component="TSMBootstrap" context="" type="0" thread="1432" file="tsmediawizardcontrol.cpp:1646">

FIX – SCCM Task Sequence Error 0x80004005 Failed to run while retrieving policy

Let’s check the solution to fix this task sequence error 0x80004005 –

  • Launch SCCM Console, Navigate to Assets and Compliance > Devices.
  • Look for the device, Remove the device entry from the SCCM Console.

Note – Collect the SMBIOS GUID for a device under the Summary tab in SCCM Console. To get SMBIOS GUID in a machine, Open the command prompt, Run command: wmic csproduct get uuid

FIX: SCCM Task Sequence Error 0x80004005 Failed to Run
SCCM – Assets and Compliance > Devices.

SMBIOS is the GUID stored in the device BIOS or UEFI. It’s unique to the device, and SCCM uses it to recognize imported computers. Collect the information as stated above. This time add a computer with the SMBIOS GUID information, import the computer with SMSBIOS GUID, and complete the wizard.

You should add a newly imported computer to a collection. This allows you to create advertisements for deploying operating systems to the computer immediately.

SCCM - Import Computer Information Wizard
SCCM – Import Computer Information Wizard

Once you are done with the above steps, Please wait to advertise the computer information. Restart the target machine and reinitiate the task sequence deployment. It should continue without any errors.

For PCs that do not successfully boot from PXE, the SMSPXE.log on the server hosting the PXE Service Point can be examined for the PC’s SMBIOS GUID. The line that contains this information will be something as follows:

MAC=<Mac_Address> SMBIOS GUID=<SMBIOS_GUID> > Device found in the database. MacCount=x GuidCount=y

To obtain the SMBIOS GUID from a PC having the problem, use one of the below methods:

At a command prompt, run the command:
wmic
When the promptwmic:rootcli>appears, type in the command:
csproduct get uuid

The SMBIOS GUID for the PC should be displayed. For Example – 4C4C4544-0032-5610-8037-C8C04P604A63

FIX: SCCM Task Sequence Error 0x80004005 Failed to Run
FIX: SCCM Task Sequence Error 0x80004005 Failed to Run

Let us know your experience with the error code and how you were able to fix it in the comment section.

About Author -> Jitesh has over 5 years of working experience in the IT Industry. He writes and shares his experiences related to Microsoft device management technologies and IT Infrastructure management. His primary focus area is Windows 10/11 Deployment solution with Configuration Manager, Microsoft Deployment Toolkit (MDT), and Microsoft Intune.

Resources

  • OSD Known Issues Troubleshooting Guide |SCCM |ConfigMgr
  • ConfigMgr OSD Troubleshooting Known Issues Guide Part 2 | SCCM
  • FIX: SCCM Task Sequence Failed to load class properties 0x80041002 (2147749890)
  • FIX: SCCM Task sequence has failed with the error code 0x800700A1

В этой статье мы расскажем, как легко и эффективно траблшутить установку Windows, выполняемую через System Center Configuration Manager (SCCM) или  с помощью MDT.

Итак, мы рассматриваем ситуацию, когда выполняется task sequence, запущенный с SCCM сервера или из MDT, интегрированной с WDS. Существенной разницы нет, ведь exit коды фактически у них одинаковые для стандартных типовых шагов. также соверщенно не важно, загружали ли вы клиента с PXE или через Boot media (загрузочную срезу на USB или DVD), главное, чтобы вы попали в среду Windows PE и могли там выбрать нужный task sequence.

Exit win32 codes — коды ошибок в task sequence

Итак, представим себе, что вы успешно запустили task sequence и через некотрое время получили окно с кодом ошибки. Вот типовые коды:

0x80070070 — «There is not enough space on the disk.» На диске нет достаточно места. Такое встречается, когда диск не обнаружен или не является disk 0 на SATA контроллере (нельзя установить ОС на disk 1 и т.д.) или когда в компьютер вставлены другие носители (флэшки, внешние диски). Также такое встречается, когда структура разделов на диске не соотвествует утанавливаемой ОС: например, диск разбит в MBR, а вы ставите в GPT.  Это типовая ситуация, когда вы устанавливаете Windows 10 в UEFI (со структурой разделов GPT) после того, как на этом диске стояла Windows 7 в Legacy mode (структура разделов MBR). И самый последний возможный случай — когда на диске есть скрытые или зашифрованные разделы (например с помощью Bitlocker). Во всех случаях диск необходимо очистить от разделов с помощью утилиты diskpart.
Очистка выполняется следующими командами в окне cmd:

diskpart
select disk 0
clean
exit

0x80070490 — «Invalid disk number specified». «System partition is not defined». Failed to identify HDD, failed to identify existing partitions on the HDD, failed to find driver for PCIVEN device. Типовая ошибка, когда Windows PE не может определить наличие диска на контроллере, разделов на нем, часто в случае неправильной настройки в BIOS или в следствие того, что ваш загрузочный образ Windows PE просто не содержит нужных драйверов для вашего контроллера диска. Напомню, что необходимо добавлять драйвера контроллеров в загрузочный образ через утилиту DISM, когда вы переходите с одной платформы на другую.

0x80070032 — «The active system partition on a MBR system must be NTFS». Существующая файловая система или разбиение диска не NTFS. Диск необходимо очистить от разделов с помощью утилиты diskpart.

0x80070570 — «An error occurred while starting task sequence». «The file or directory is corrupted and unreadable.» Эта ошибка может как означать повреждение самого диска или файловой системы, так и исходных файлов пакетов, которые вы ставите на диск. Также эта ошибка встречается, когда компьютер некорректно выключен и Windows хочет проверить диск на ошибки при следующей загрузке.

0x80070057 — «Format failed». Утилита для форматирования диска. встроенная в MDT, не может отформатировать диск. Чаще всего из-за того, что диск не определяется или не подключен как disk 0 в системе.

0x80070002 — «The system cannot find the file specified». Если установка происходит с SCCM, то это означает, что пакет не удалось успешно скачать с сервера, в остальных случаях — в пакете установки программы используется неверный путь или отсуствуют какие-то файлы.

0x80004005 — «An error occurred while retrieving policy for this computer». Эта ошибка может иметь за собой массу различных причин, потому что 4005 — это generic code, означающий, что операция не может быть выполнена. Но если она встречается в самом начале до выбора task sequence для исполнения и сопровожается текстом ошибки «An error occurred while retrieving policy for this computer», то это происходит, когда клиент не может получить список task sequence с SCCM сервера. Причина тому — неправильное время, установленное на клиете или сетевая ошибка. Также, это может быть следствием того, что сертификат в загрузочном образе (boot image) и сертификат на Management point сервере SCCM  отличаются.
Поясню механизм, как это работает. Ваш загрузочный образ должен содержать всю неободимую информацию для подключения к серверам SCCM (прописывается в конфигурационном файле MDT). Затем, при загрузке Windows PE исполняется необходимая последовательность команд, в частности подключение к Management Point, откуда клиент должен забрать список доступных Task sequences. В этот момент ко всему прочему проверяется время на клиенте и на сервере, если они отличаются, сервер ответит отказом. Равно как и в случае неподходящего сертификата.

В остальных случаях 0x80004005 просто означает неудачное выполнение операции. Чтобы узнать детали, что именно было не выполенно, необходимо изучать логи SCCM.

Как собирать логи SCCM / MDT

 MDT создает следующие лог-файлы:

  • BDD.log. Это файл-агрегатор, который содержит результаты основных шагов task sequence.
  • dism.log — лог, создаваемый командой DISM, когда та используется для конфигурирования установленной Windows (в первую очередь при unattended установке драйверов)
  • LiteTouch.log. Этот файл создается, если вы используете LTI деплойменты. По умолчанию располагается в %WINDIR%TEMPDeploymentLogs.
  • NetSetup.LOG — файл содержит сетевую информация о добавлении компьютера в домен.
  • Scriptname.log. Такие файлы создаются каждым MDT скриптом согласно его имени.
  • SMSTS.log. Это главный файл. создаваемый самим секвенсором (исполнителем Task sequence). Этот файл описывает все шаги Task sequence, по окончании каждого шага выводит exit win32 code, с которым он завершился. По умолчанию, этот файл имеет размер 2 Мбайт. Если общий размер лога превышает этот размер, то создается второй, третий и т.д. файлы, начинающиеся на smsts*. Файл может располагаться в %TEMP%, %WINDIR%System32ccmlogs, or C:_SMSTaskSequence, or C:SMSTSLog в зависимости от типа установки (MDT, SCCM, с SCCM килентом или без) и от этапа, на котром сейчас находится установка ОС.
  • Wizard.log. Мастер установки MDT создает этот файл.
  • WPEinit.log. Этот файл создается Windows PE при его инициализации и полезен при траблшутинге самого Windows PE.
  • zticonfigure.log — содержит информацию о конфигурировании кастомных настроек Windows, которые вы указали в конфигурации MDT (чаще всего это региональная локализация). Создается при ZTI деплойментах с SCCM.
  • ztigroups.log — содержит информацию о добавлении групп в локальные администраторы на компьютере, если таковые были указаны в настройках MDT. Создается при ZTI деплойментах с SCCM.

В конце выполнения task sequence все логи копируются в папку, указанную в свойстве  SLShare файле настроек MDT Customsettings.ini file. Если вы указали сетевой путь, то сетевой ресурс должен быть доступен для этого.

Дополнительно, сама Windows создает два полезных файла в папке C:WindowsPantherUnattendGCsetupact.log и setuperr.log. С помощью них вы можете найти ошибки во время конфигурирования Windows и добавления компьютера в домен.

Расположение логов меняется в зависимости от того, какой тип установки вы используете (LTI, ZTI, с SCCM или без). Но в общем случае порядок их поиска таков:

  1. На стадии начала работы Windows PE до запуска task sequence логи находятся в X:windowstempsmstslog
  2. После запуска task sequence в Windows PE, во время форматирования диска и прочих сервисных операций Windows PE  — в X:MININTSMSOSDOSDLOGS
  3. После форматирования диска и во время применения образа на диск — на локальном диске C: или D: (в зависимости от того, как вы форматировали диск): C:_SMSTaskSequenceLogs и C:SMSTSLog
  4. После установки SCCM клиента, если такая есть в вашем task sequence логи будут сохраняться в C:WindowsCCMLogs, потому что с этого момента SCCM клиент управляет установкой программ.
  5. В папке %WINDIR%TEMPDeploymentLogs будут храниться логи, если вы использовали LTI установку через MDT без SCCM.

Чем читать логи

Программой Cmtrace. Она вохдит в состав пакет System Center 2012 R2 Configuration Manager Toolkit в виде самостоятельной утилиты. Я рекомендую встроить ее в ваш загрузочный образ. Чтобы прочитать логи в Windows PE, нажмите F8, появится окно cmd, где вы можете или вызвать cmtrace или explorer.

[Посещений: 6 143, из них сегодня: 1]

check
Best Answer

  • Author Jeremy Knutson

    Thank you all for your suggestions, In digging through them, I found that my VM that I used to build and capture the image was set to Legacy instead of EFI. I am going to rebuild the image capture VM with this setting corrected. I will report back with my findings.

    Thank you again.


    Was this post helpful?
    thumb_up
    thumb_down

  • View Best Answer in replies below

    11 Replies

    • 1) Check your Distribution Point self-signed certificate hasn’t expired:

      Text

      Administration > Distribution Points > Properties of DP
      

      Check the expiration date. If it’s expired, simply create a new certificate and update all of your boot images to the DP.

      2) BIOS date/time on the client. Ensure it’s correct.

      If points 1 and 2 are OK, I’d try recreating the boot media just in case.


      Was this post helpful?
      thumb_up
      thumb_down

    • Make sure you do not have an existing record of this computer in AD or already in SCCM. If so delete it and retry.


      Was this post helpful?
      thumb_up
      thumb_down

    • Pastebin is blocked at my work. Can you attach the log as a .txt file?


      Was this post helpful?
      thumb_up
      thumb_down

    • Looks like this line is the culprit:

      Text

      line 1063: <![LOG[Process completed with exit code 2147500037]LOG]!><time="20:55:03.324+480" date="03-17-2017" component="TSManager" context="" type="1" thread="1436" file="commandline.cpp:1124">
      

      A quick google of that exit code: https://ardamis.com/2015/11/07/troubleshooting-sccm-2012-task-sequence-failures/ Opens a new window

      What is this task sequence supposed to do?

      My task sequences are limited to clean installs of Windows 10; and one that I got from TechNet to upgrade Win7 to Win10 when it first came out.


      Was this post helpful?
      thumb_up
      thumb_down

    • First rule of SCCM: use CMTrace.exe to review your logs.

      Second rule of SCCM: use CMTrace.exe to review your logs.

      Image: post content

      0x80004005 is the worst generic error code because it doesn’t actually mean anything.  Whenever that pops up, you have to roll up your sleeves and prepare for a long day of investigating and testing.

      First place I would look is to verify your disk partitioning task sequences.

      EDIT: I didn’t realize that screen cap would be so awful.  Here are the two lines that caught my eye that should start your investigation:

      • System partition not set
      • Unable to find the partition that contains the OS boot loaders. Please ensure the hard disks have been properly partitioned. Unspecified error (Error: 80004005; Source: Windows)

      All the other errors that follow cascade from that initial failure.


      2 found this helpful
      thumb_up
      thumb_down

    • Author Jeremy Knutson

      Thank you all for your suggestions, In digging through them, I found that my VM that I used to build and capture the image was set to Legacy instead of EFI. I am going to rebuild the image capture VM with this setting corrected. I will report back with my findings.

      Thank you again.


      Was this post helpful?
      thumb_up
      thumb_down

    • Make sure you select the correct Image Index as well. That has burned me before.


      Was this post helpful?
      thumb_up
      thumb_down

    • Jeremy9642 wrote:

      Thank you all for your suggestions, In digging through them, I found that my VM that I used to build and capture the image was set to Legacy instead of EFI. I am going to rebuild the image capture VM with this setting corrected. I will report back with my findings.

      Thank you again.

      Boom.  Disk partition type conflict in the TS. :)


      Was this post helpful?
      thumb_up
      thumb_down

    • Author Jeremy Knutson

      After rebuilding the image on a EFI VM the issue has been resolved.


      Was this post helpful?
      thumb_up
      thumb_down

    • Author Elijah Watts

      I changed the secure boot option to disabled, then change UEFI only to both and that resolved my issue.


      Was this post helpful?
      thumb_up
      thumb_down

    • The fix for me was creating a default TS to «Deploy and existing image»… I then manually recreated all the partition settings in my custom TS, copying the default, and it worked like a charm!


      Was this post helpful?
      thumb_up
      thumb_down

    This post provides solution to SCCM task sequence error 0x80004005 while retrieving policy. Before you read further, I want to tell you that error 0x80004005 is a generic error. Which means there could be more than one solution for this error. Therefore you must examine the smsts.log file to find out the actual issue. In my case during the OSD the task sequence failed at the very initial step. This issue was observed on one of the VM’s. So here is the issue and it’s description.

    Task Sequence fails with the following error message. An error occurred while retrieving policy for this computer (0x80004005). For more information, please contact your system administrator or helpdesk operator.

    SCCM Task Sequence Error 0x80004005 while retrieving policyThe smsts.log file reveals the following.

    PatchMyPC HorizontalAD

    Patch My PC Sponsored AD

    unknown host (gethostbyname failed).
    sending with winhttp failed; 80072ee7.
    Failed to get client identity (80072ee7).
    Failed to request for client TSPxe.
    SyncTimeWithMP() failed. 80072ee7.
    Failed to get time information from MP: http://MPserverFQDN.
    An error occurred while retrieving policy for this computer (0x80004005).
    For more information, contact your system administrator or helpdesk operator.
    RegOpenKeyExW is unsuccessful for SoftwareMicrosoftSMSTask Sequence.
    GetTsRegValue() is unsuccessful. 0x80070002.
    TS environment not initialized

    Looking at the log file details, you could make out that there is a time sync issue. The error “SyncTimeWithMP() failed 80072ee7” should give you clear info that there is some issue with time synchronization. To resolve this issue one must check the clock in the BIOS of the affected machine. Ensure that the time in BIOS matches the time in the forest where the SCCM server is located. In other words ensure the time settings are same with both SCCM and PXE client. If not you will end up seeing the time sync errors. If you correct this, I bet the deployment should continue successfully in next try.

    Avatar photo

    Prajwal Desai is a Microsoft MVP in Enterprise Mobility. He writes articles on SCCM, Intune, Configuration Manager, Microsoft Intune, Azure, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.

    Понравилась статья? Поделить с друзьями:
  • Task scheduler failed to start task for user additional data error value 2147943785
  • Templateinputexception an error happened during template parsing
  • Task scheduler failed to start additional data error value 2147943645
  • Templatedoesnotexist at django как исправить
  • Task host window при выключении windows 10 как исправить