Task sequence and OSD

0x00000001: A command in the task sequence returned exit code 1

A task sequence step ran a command or script and it ended with exit code 1. The step failed, and the real reason is inside that command.

Hex code0x00000001
Decimal1
Logs to readsmsts.log

What 0x00000001 means

The task sequence ran a program and the program ended with the number 1. SCCM treats any exit code that is not on the step's success list as a failure. It shows the code as 0x00000001 and often adds the text "Incorrect function".

You see it in smsts.log and on the task sequence error screen. The text "Incorrect function" is only the Windows name for error number 1. It does not describe your problem. The command itself decides what 1 means.

Common causes

  • A script in a Run Command Line or Run PowerShell Script step hit an error.
  • The command cannot find a file, because the step has no package or the path is wrong.
  • A tool is not available in WinPE, or needs a component the boot image lacks.
  • The command needs a network share or an account that is not available at that point.
  • An installer returned 1 as its own failure code.

How to fix 0x00000001

  1. Find the command line in smsts.log

    Open smsts.log and search for the step name. In WinPE the log is at X:\Windows\Temp\SMSTSLog\smsts.log. After the client is installed it is in C:\Windows\CCM\Logs\Smstslog. Read the full command line and the lines of output before the exit code.

  2. Run the command by hand

    Press F8 on the failed computer. Command support must be on in the boot image. Type the same command at the prompt. Now you see the real error text that the task sequence hid.

  3. Check the package and the path

    Open the step in the task sequence editor. If the command uses files, tick Package and select the package that holds them. The command then starts in that folder. Use relative paths, not drive letters from your own computer.

  4. Make the script write a log

    Add logging to the script. Write to the folder in the variable _SMSTSLogPath, so your log sits next to smsts.log and moves with it. For PowerShell scripts, set the execution policy on the step to Bypass.

  5. Decide whether 1 is a real failure

    Some tools return 1 for a warning. If you are sure the result is fine, add 1 to "Success codes" on the Options tab of a Run Command Line step. Or tick "Continue on error". Use this with care, because it hides real failures too.

Commands that help

Show the task sequence log folder from the F8 prompt · Command Prompt
dir X:\Windows\Temp\SMSTSLog
Got a different code?

Turn any hex or decimal error code into its meaning, or search every code on this site.

Error code lookup All SCCM error codes

✉

Get new articles in your inbox

SCCM guides, AI tools, automation tips — sent when published. No spam.