When a task sequence fails, the device shows an error code and a countdown, then restarts. The code alone rarely tells you much: the reason is in smsts.log, which moves as the deployment progresses. In this post I'll show where to find the log in each phase, how to keep the device on the error, and how to fix the usual failure areas: drivers, network access, content and domain join.
Errors this guide fixes
0x80004005Task sequence error dialog0x80070002Task sequence error dialog / smsts.logFailed to resolve selected task sequence dependenciessmsts.log0x80040104smsts.logFailed to run the actionsmsts.log0x80091007smsts.log0x80072EE7smsts.log+2 more guides0x54bNetSetup.LOG
Symptoms#
- A Task Sequence … has failed with the error code dialog, often with
0x80004005or0x80070002, then a restart. - Failed to Run Task Sequence before any step runs, saying files for a package can't be located on a distribution point.
- WinPE loads and restarts within seconds, or disk steps fail on new hardware.
- Windows finishes, but the device is in a workgroup instead of the domain.
Why it happens#
The task sequence engine runs steps in order. A step that returns anything other than a success code fails, and unless Continue on error is set on the step or its group, the sequence stops. The code on screen is usually the last link in the chain, such as 0x80004004 (operation aborted); the real cause sits higher in the log. The log itself moves as the disk is formatted and the client installs:
| Phase | smsts.log location |
|---|---|
| WinPE, before formatting the disk | X:\Windows\Temp\SMSTSLog |
| WinPE, after formatting the disk | X:\SMSTSLog, copied to C:\_SMSTaskSequence\Logs\Smstslog |
| Full OS, before the client installs | C:\_SMSTaskSequence\Logs\Smstslog |
| Full OS, after the client installs | C:\Windows\CCM\Logs\SMSTSLog |
| After the task sequence finishes | C:\Windows\CCM\Logs |
Drive letters can differ in WinPE, and a full log rolls over to smsts-<date>-<time>.log, so search each drive: dir /s /b C:\smsts*.log.
How to fix it#
1. Keep the device on the error#
Turn on Enable command support (testing only) on the Customization tab of the boot image properties, then update its distribution points. In WinPE, press F8 for a command prompt; the device won't restart while that window is open. For more time on the error dialog, set the variable SMSTSErrorDialogTimeout (seconds; default 900) on the collection. First checks:
ipconfig /all
nslookup cm01.contoso.com
diskpart
list diskNo IPv4 address points to a missing network driver; an empty list disk points to a missing storage driver. Turn command support off again in production boot images, because an open F8 prompt is a security risk.
2. Read the log from the failure upwards#
Open the log in CMTrace if your boot image includes it, otherwise Notepad. Search for Failed to run the action, which names the failed step, then read upwards to the first error:
Failed to run the action: Apply Driver Package.
The system cannot find the file specified. (Error: 80070002; Source: Windows)
The execution of the group (Drivers) has failed and the execution has been aborted. An action failed.
Operation aborted (Error: 80004004; Source: Windows)Some lines show codes in decimal: in PowerShell, '{0:X}' -f 2147942402 returns 80070002. CMTrace's Tools › Error Lookup gives the description.
| Code | Meaning | Usual cause |
|---|---|---|
0x80070002 | File not found | Wrong path in a command line, or content that didn't download |
0x80070005 | Access denied | The account used for content or a share lacks rights |
0x80072EE7, 0x80072EFD | Name not resolved; can't connect | DNS, network driver, firewall or certificates |
0x80091007 | Hash value isn't correct | Content changed or corrupt on the distribution point |
0x80070070 | Not enough disk space | The content cache volume is full |
3. Drivers and storage#
If WinPE has no IP address or no disk, add the network or storage driver (newer devices often need one for Intel VMD) on the Drivers tab of the boot image properties and update its distribution points. Keep boot images lean: network and storage drivers only. If Apply Driver Package fails, check that the package is distributed and that the step's condition, such as SELECT * FROM Win32_ComputerSystem WHERE Model LIKE '%Latitude 7450%', matches the model the firmware reports.
4. Content and network access#
Failed to resolve selected task sequence dependencies with 0x80040104, logged before the first step, means referenced content has no location the device may use. The lines above it name the package ID; match it on the task sequence's References tab, check its content status and distribute it, or run Distribute Content on the task sequence itself.
If the content exists only outside the device's boundary group, distribute it locally or allow fallback on the deployment's Distribution Points page: When no local distribution point is available, use a remote distribution point and Allow clients to use distribution points from the default site boundary group. A task sequence doesn't wait for fallback times; it uses them only to order neighbor groups.
For hash errors, redistribute the content to that distribution point. For access-denied errors, check the account in use: with Enhanced HTTP or HTTPS most task sequence downloads don't need a network access account, but an expired one still breaks the scenarios that use it.
5. Domain join#
Apply Network Settings only writes the join details into the unattend file; Windows Setup joins later, so the sequence can succeed while the device stays in a workgroup. Read C:\Windows\debug\NetSetup.LOG and C:\Windows\Panther\UnattendGC\setupact.log:
| Status | Meaning | Fix |
|---|---|---|
0x52e | Wrong user name or password | Re-enter the join account |
0x54b | Domain not found or unreachable | DNS, or a missing network driver in Windows |
0x5 | Access denied | Grant rights on the OU and existing computer objects |
0x216d | Machine account quota exceeded | Delegate create-computer rights on the OU |
6. Capture logs automatically#
Put the main steps in a group with Continue on error. Add a second group with the condition _SMSTSLastActionSucceeded equals false: a Connect to Network Folder step mapping Z:, a Run Command Line step with the command below, and a final cmd.exe /c exit 1 so the deployment still reports failure.
cmd.exe /c xcopy "%_SMSTSLogPath%" "Z:\%_SMSTSMachineName%\" /E /I /Y /CVerify the fix#
- Rerun the sequence on a test device: the final
C:\Windows\CCM\Logs\smsts.loghas noFailed to run the actionlines, and the device shows Success in Monitoring › Deployments. - For domain join,
Test-ComputerSecureChannelreturnsTrueand the computer object is in the expected OU. - Device Manager shows no unknown devices.
Prevent it next time#
- Check references and distribute everything to distribution point groups before deploying; pilot new hardware models first.
- Apps used in Install Application steps must allow installation from a task sequence without being deployed; their failures are in
AppEnforce.log(see application deployment failures). - After a site upgrade or new Windows ADK, update and redistribute boot images (see upgrading current branch).

