When attempting to create an OS image using SCCM image capture, the process may fail due to errors related to Sysprep. A common error reported in the smsts.log file and other related logs includes:
Executing task sequence manager service. Code 0x80004005
Additionally, the %WINDIR%\System32\Sysprep\Panther\setupact.log file might show errors such as:
Error SYSPRP Sysprep_Clean_Validate_Opk: Audit mode can't be turned on if there is an active scenario.; hr = 0x800F0975
OR
Error SYSPRP Sysprep_Clean_Validate_Opk:Failed to query pending CBS operations; hr = 0x800706b5[gle=0x000003f0]
OR
Error SYSPRP Sysprep_Clean_Validate_Opk: Audit mode cannot be turned on if reserved storage is in use. An update or servicing operation may be using reserved storage.; hr = 0x800F0975
Resolution Steps
Option 1: Install All Pending Windows Updates
- Navigate to Settings → Windows Update.
- Click on Check for updates.
- Install all available updates until the OS is fully up to date.
Option 2: Pause Updates Temporarily
- Navigate to Settings → Windows Update.
- Select Pause updates and choose Pause for 1 week.
If Reserved Storage Is in Use
If the error message indicates “Audit mode cannot be turned on if reserved storage is in use,” follow these steps:
- Modify the Registry:
- Open the Registry Editor.
- Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager - Locate the
ActiveScenariokey and set its value to0. - Restart the system.
- Disable Reserved Storage:
- Open a command prompt with administrative privileges.
- Run the following command:
DISM.exe /Online /Set-ReservedStorageState /State:Disabled
Retrying the OS Capture
After performing the steps above, attempt to run the OS capture process again using SCCM.
Additional Notes
- Ensure the
smsts.logfile is checked for detailed information about the failure. The log is typically located at:c:\_SMSTaskSequence\Logs\Smstslog\smsts.log - Keep the system updated and perform regular maintenance to avoid similar issues in the future.