The Sysprep tool is essential for preparing Windows images for deployment, especially in enterprise environments. However, encountering the error message "Sysprep was not able to validate your Windows installation" on Windows 11 can halt your deployment process and be quite frustrating. This error can stem from various underlying issues within the system. In this guide, we'll explore several methods to resolve this error so you can successfully run Sysprep on your Windows 11 machine.

Disable the upgrade registry key entry

One common cause of the Sysprep validation error is the presence of an Upgrade registry key, especially after performing a Windows upgrade. Removing this key can often resolve the issue.

Step 1: Open the Registry Editor by pressing Win + R to open the Run dialog, typing regedit, and pressing Enter. If prompted by User Account Control, click Yes.

Step 2: In the Registry Editor window, navigate to the following path:

HKEY_LOCAL_MACHINE\SYSTEM\Setup

Step 3: On the right pane, locate the Upgrade key. Right-click on it and select Delete to remove it.

Step 4: Confirm the deletion by clicking Yes in the prompt.

Step 5: Next, navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus

You can paste this path directly into the Registry Editor's address bar for quick access.

Step 6: In the right pane, check for a DWORD value named CleanupState. If it doesn't exist, you'll need to create it. Right-click on an empty space, select New > DWORD (32-bit) Value, and name it CleanupState.

Step 7: Double-click on CleanupState and set its value data to 7. Click OK to save the changes.

Step 8: Close the Registry Editor and restart your computer. After rebooting, attempt to run Sysprep again to see if the issue is resolved.

Reinstall the default Windows apps

Missing or uninstalled default Windows apps can interfere with Sysprep's validation process. Reinstalling these apps can help eliminate the error.

Step 1: Open Windows PowerShell with administrative privileges. Right-click the Start menu and select Windows Terminal (Admin), which opens PowerShell by default.

Step 2: In the PowerShell window, enter the following command and press Enter:

Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Step 3: Wait for the process to complete. It may take some time to reinstall all default apps.

Step 4: Once it's finished, restart your PC and try running Sysprep again.

Uninstall problematic UWP apps

Universal Windows Platform (UWP) apps installed from the Microsoft Store can sometimes cause issues with Sysprep, especially if they aren't provisioned properly. Removing these apps may resolve the error.

Step 1: Press Win + I to open Settings, then select Apps on the left pane and click Apps & features.

Step 2: Scroll through the list to find any UWP apps you've installed, such as Candy Crush or Twitter.

Step 3: Click the three-dot menu next to the app and select Uninstall.

Step 4: Confirm the uninstallation by clicking Uninstall again.

If the error persists, you may need to remove specific app packages using PowerShell.

SYSPREP failed to remove apps for the current user

If the log file contains errors such as:

  • SYSPRP Package <App Name>_1.2.3.500_x64__8we4y23f8b4ws was installed for a user, but not provisioned for all users.
  • SYSPRP Failed to remove apps for the current user: 0x80073cf2.

You need to remove the specified app package using PowerShell.

Step 1: Open PowerShell as an administrator. Right-click the Start menu and select Windows Terminal (Admin).

Step 2: Run the following commands:

Import-Module Appx
Import-Module Dism
Get-AppxPackage -AllUsers | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation

Step 3: Identify the problematic app's PackageFullName from the list.

Step 4: To remove the app for the current user, run:

Remove-AppxPackage -Package <PackageFullName>

Step 5: If necessary, remove the provisioning package with:

Remove-AppxProvisionedPackage -Online -PackageName <PackageFullName>

Step 6: If the app is installed for other users, remove it for all users with:

Remove-AppxPackage -Package <PackageFullName> -AllUsers

Repeat these steps for any other problematic apps. Afterwards, try running Sysprep again.

Turn off BitLocker

Sysprep may encounter issues if BitLocker encryption is enabled on your system drive. Disabling BitLocker can help resolve the error.

Step 1: Open Command Prompt as an administrator. Right-click the Start menu and select Command Prompt (Admin).

Step 2: Type manage-bde -status and press Enter to check the encryption status.

Step 3: If BitLocker is On for the C: drive, disable it by typing manage-bde -off C: and pressing Enter.

Step 4: Wait for the decryption process to complete. You can check the progress by running manage-bde -status again.

Step 5: Once finished, attempt to run Sysprep again.

Disable TPM and PTT

Sometimes, even after disabling BitLocker, the system assumes it's still active due to TPM (Trusted Platform Module) or PTT (Platform Trust Technology). Disabling TPM/PTT in the BIOS can help.

Step 1: Restart your computer and enter the BIOS/UEFI settings. This is usually done by pressing a key like F2, F10, or Del during startup.

Step 2: Navigate to the security settings and locate TPM or PTT options.

Step 3: Disable these options, then save the changes and exit the BIOS.

Step 4: After rebooting, try running Sysprep once more.

Pause Windows Updates

Active Windows Update processes can interfere with Sysprep. Pausing updates can help you bypass the error.

Step 1: Open Settings by pressing Win + I. Select Windows Update on the left pane.

Step 2: Click on Pause for 1 week to temporarily halt updates.

Step 3: Ensure there are no pending updates by clicking Check for updates and installing any available ones before pausing.

Step 4: Restart your computer to complete any installations, then attempt to run Sysprep.

Replace the spopk.dll file

A corrupted or missing spopk.dll file can cause validation errors with Sysprep. Replacing this file might resolve the issue.

Step 1: Take ownership of the file. Open Command Prompt as an administrator and run:

takeown /f %WinDir%\System32\spopk.dll
icacls %WinDir%\System32\spopk.dll /Grant Administrators:f

Step 2: Navigate to %windir%\System32 using File Explorer. You can paste this path into the address bar and press Enter.

%windir%\System32

Step 3: Replace the spopk.dll file with a known good copy from another Windows 11 installation or a trusted source.

Step 4: Confirm any prompts to replace the file.

Step 5: Restart your computer and try running Sysprep again.

Perform DISM and SFC scans

System file corruption can lead to Sysprep errors. Using the Deployment Image Servicing and Management (DISM) tool along with the System File Checker (SFC) can repair corrupted system files.

Step 1: Open Command Prompt as an administrator. Right-click the Start menu and select Command Prompt (Admin).

Step 2: Run the following command to perform an SFC scan:

sfc /scannow

Step 3: Wait for the scan to complete. If any issues are found, SFC will attempt to repair them.

Step 4: After the SFC scan completes, run these DISM commands one after the other:

DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /RestoreHealth

Step 5: Once the scans are complete, restart your computer and try running Sysprep again.

Create a new administrator account

Sometimes, user account issues can prevent Sysprep from validating the installation. Creating a new administrator account may help.

Step 1: Open Settings with Win + I, then go to Accounts and select Other users.

Step 2: Click on Add account.

Step 3: Choose I don't have this person's sign-in information, then select Add a user without a Microsoft account.

Step 4: Enter a username and password for the new account and click Next.

Step 5: After creating the account, click on it and select Change account type.

Step 6: Change the account type to Administrator and click OK.

Step 7: Sign out of your current account and sign in with the new administrator account. Back up any necessary data from your old account.

Step 8: Remove the old account by selecting it under Other users and clicking Remove, followed by Delete account and data.

Step 9: After removing the old account, try running Sysprep again.

Reset your PC

As a last resort, resetting your PC can resolve persistent issues that prevent Sysprep from validating your installation.

Step 1: Open Settings and navigate to System, then click on Recovery.

Step 2: Under Recovery options, click the Reset PC button.

Step 3: Choose whether to Keep my files or Remove everything, depending on your preference.

Step 4: Select either Cloud download or Local reinstall. Cloud download will fetch the latest version of Windows 11 from Microsoft's servers, while Local reinstall uses files already on your PC.

Step 5: Follow the on-screen instructions and click Reset to begin the process.

Step 6: Wait for the reset to complete. Your system will restart several times during this process.

Step 7: After the reset is complete, your system will have a fresh installation of Windows 11, and you can attempt to run Sysprep again.


By following these methods, you should be able to resolve the "Sysprep was not able to validate your Windows installation" error on your Windows 11 PC.