Skip to main content
Added important detail from my comments to retain the content and detail.
Source Link

Sysprep or Feature Update Failure

After you successfully complete the 20H2 upgrade, performPerform the followingbelow steps before you run sysprep but start with only 1-5 and see if that does/or after any Windows 10 feature update or sysprep operation. After any feature update install completes, log into the computer, and then restart it one time. Run these steps as a post update cleanup task after a login and restart post feature update completion.

If not and post sysprep first boot or login fails still, look overThere are also some additional considerationsconsideration anditems to perform more from thereshould none of these steps help resolve the problem.

  1. Log onto the machine as local administrator and confirm the login is successful

  2. Go to Control Panel | System | Advanced system settings | Advanced tab | User Profiles section | Settings

  3. Highlight and delete all Account Unknown accounts and any other accounts one-by-one other than Default Profile and the local administrator account you are signed on as now. enter image description here

  4. Run the below elevated as administrator after you remove all unknown profiles from the system as specified in step #3. Ignore all command errors and just let it complete.

    Get-AppXpackage -AllUsers | Remove-AppxPackage;
    
    Get-AppxPackage | % { 
        Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" 
        };
    
    Get-AppxPackage -AllUsers | % { 
        Add-AppxPackage -Register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode 
        };
    
  5. Run the below PowerShell elevated and let it finish

    PowerShell Elevated

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | % {
        New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force
    };
    Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' 
    
  6. Run the below DISM.exe processes admin elevated below one by one until they all complete.

    DISM.exe /online /Cleanup-Image /StartComponentCleanup
    DISM.exe /online /Cleanup-Image /SPSuperseded
    DISM.exe /online /cleanup-image /restorehealth
    

After you successfully complete the 20H2 upgrade, perform the following steps before you run sysprep but start with only 1-5 and see if that does it.

If not and post sysprep first boot or login fails still, look over additional considerations and perform more from there.

  1. Log onto the machine as local administrator and confirm the login is successful

  2. Go to Control Panel | System | Advanced system settings | Advanced tab | User Profiles section | Settings

  3. Highlight and delete all Account Unknown accounts and any other accounts one-by-one other than Default Profile and the local administrator account you are signed on as now. enter image description here

  4. Run the below PowerShell elevated and let it finish

    PowerShell Elevated

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | % {
        New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force
    };
    Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' 
    
  5. Run the below DISM.exe processes admin elevated below one by one until they all complete.

    DISM.exe /online /Cleanup-Image /StartComponentCleanup
    DISM.exe /online /Cleanup-Image /SPSuperseded
    DISM.exe /online /cleanup-image /restorehealth
    

Sysprep or Feature Update Failure

Perform the below steps before and/or after any Windows 10 feature update or sysprep operation. After any feature update install completes, log into the computer, and then restart it one time. Run these steps as a post update cleanup task after a login and restart post feature update completion.

There are also some additional consideration items to perform should none of these steps help resolve the problem.

  1. Log onto the machine as local administrator and confirm the login is successful

  2. Go to Control Panel | System | Advanced system settings | Advanced tab | User Profiles section | Settings

  3. Highlight and delete all Account Unknown accounts and any other accounts one-by-one other than Default Profile and the local administrator account you are signed on as now. enter image description here

  4. Run the below elevated as administrator after you remove all unknown profiles from the system as specified in step #3. Ignore all command errors and just let it complete.

    Get-AppXpackage -AllUsers | Remove-AppxPackage;
    
    Get-AppxPackage | % { 
        Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" 
        };
    
    Get-AppxPackage -AllUsers | % { 
        Add-AppxPackage -Register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode 
        };
    
  5. Run the below PowerShell elevated and let it finish

    PowerShell Elevated

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | % {
        New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force
    };
    Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' 
    
  6. Run the below DISM.exe processes admin elevated below one by one until they all complete.

    DISM.exe /online /Cleanup-Image /StartComponentCleanup
    DISM.exe /online /Cleanup-Image /SPSuperseded
    DISM.exe /online /cleanup-image /restorehealth
    
Bounty Ended with 50 reputation awarded by jwitt98
added 63 characters in body
Source Link

After you successfully complete the 20H2 upgrade, perform the following steps before you run sysprep but start with only 1-5 and see if that does it. 

If not and post sysprep first boot or login fails still, look over additional considerationsadditional considerations and perform more from there.

  1. Log onto the machine as local administrator and confirm the login is successful

  2. Go to Control Panel | System | Advanced system settings | Advanced tab | User Profiles section | Settings

  3. Highlight and delete all Account Unknown accounts and any other accounts one-by-one other than Default Profile and the local administrator account you are signed on as now. enter image description here

  4. Run the below PowerShell elevated and let it finish

    PowerShell Elevated

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | % {
        New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force
    };
    Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' 
    
  5. Run the below DISM.exe processes admin elevated below one by one until they all complete.

    DISM.exe /online /Cleanup-Image /StartComponentCleanup
    DISM.exe /online /Cleanup-Image /SPSuperseded
    DISM.exe /online /cleanup-image /restorehealth
    

Additional Considerations

  • Purge HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows keys before running sysprep to blow away any registry set policies which may be set

  • Look over gpedit.msc and look for and set any policies set to Not Configured and reboot and log back on if any were found before you run sysprep

  • Obviously you do not want the machine to be joined to any domain while being sysprep'd so ensure that's not an issue

  • Check for any services.msc services that are set to run as a domain credential and if any are found, set those to disabled, or delete software to remove, or run sc commands to delete those.

    Be sure to reboot after removing or disabling when or if found and confirm they are gone once logged back on, and then run sysprep.

  • As per advice from the Sysprep generalize fails post, look over the HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList registry keys and see if the profile for any user account there points to a drive other than C:\Users\<UserAccountName> and fix that and confirm fixed with a reboot, and then run sysprep afterwards. Look at the ProfileImagePath values for each profile GUID from those keys.

After you successfully complete the 20H2 upgrade, perform the following steps before you run sysprep but start with only 1-5 and see if that does it. If look over additional considerations and perform more from there.

  1. Log onto the machine as local administrator and confirm the login is successful

  2. Go to Control Panel | System | Advanced system settings | Advanced tab | User Profiles section | Settings

  3. Highlight and delete all Account Unknown accounts and any other accounts one-by-one other than Default Profile and the local administrator account you are signed on as now. enter image description here

  4. Run the below PowerShell elevated and let it finish

    PowerShell Elevated

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | % {
        New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force
    };
    Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' 
    
  5. Run the below DISM.exe processes admin elevated below one by one until they all complete.

    DISM.exe /online /Cleanup-Image /StartComponentCleanup
    DISM.exe /online /Cleanup-Image /SPSuperseded
    DISM.exe /online /cleanup-image /restorehealth
    

Additional Considerations

  • Purge HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows keys before running sysprep to blow away any registry set policies which may be set

  • Look over gpedit.msc and look for and set any policies set to Not Configured and reboot and log back on if any were found before you run sysprep

  • Obviously you do not want the machine to be joined to any domain while being sysprep'd so ensure that's not an issue

  • Check for any services.msc services that are set to run as a domain credential and if any are found, set those to disabled, or delete software to remove, or run sc commands to delete those.

    Be sure to reboot after removing or disabling when or if found and confirm they are gone once logged back on, and then run sysprep.

  • As per advice from the Sysprep generalize fails post, look over the HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList registry keys and see if the profile for any user account there points to a drive other than C:\Users\<UserAccountName> and fix that and confirm fixed with a reboot, and then run sysprep afterwards. Look at the ProfileImagePath values for each profile GUID from those keys.

After you successfully complete the 20H2 upgrade, perform the following steps before you run sysprep but start with only 1-5 and see if that does it. 

If not and post sysprep first boot or login fails still, look over additional considerations and perform more from there.

  1. Log onto the machine as local administrator and confirm the login is successful

  2. Go to Control Panel | System | Advanced system settings | Advanced tab | User Profiles section | Settings

  3. Highlight and delete all Account Unknown accounts and any other accounts one-by-one other than Default Profile and the local administrator account you are signed on as now. enter image description here

  4. Run the below PowerShell elevated and let it finish

    PowerShell Elevated

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | % {
        New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force
    };
    Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' 
    
  5. Run the below DISM.exe processes admin elevated below one by one until they all complete.

    DISM.exe /online /Cleanup-Image /StartComponentCleanup
    DISM.exe /online /Cleanup-Image /SPSuperseded
    DISM.exe /online /cleanup-image /restorehealth
    

Additional Considerations

  • Purge HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows keys before running sysprep to blow away any registry set policies which may be set

  • Look over gpedit.msc and look for and set any policies set to Not Configured and reboot and log back on if any were found before you run sysprep

  • Obviously you do not want the machine to be joined to any domain while being sysprep'd so ensure that's not an issue

  • Check for any services.msc services that are set to run as a domain credential and if any are found, set those to disabled, or delete software to remove, or run sc commands to delete those.

    Be sure to reboot after removing or disabling when or if found and confirm they are gone once logged back on, and then run sysprep.

  • As per advice from the Sysprep generalize fails post, look over the HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList registry keys and see if the profile for any user account there points to a drive other than C:\Users\<UserAccountName> and fix that and confirm fixed with a reboot, and then run sysprep afterwards. Look at the ProfileImagePath values for each profile GUID from those keys.

Source Link

After you successfully complete the 20H2 upgrade, perform the following steps before you run sysprep but start with only 1-5 and see if that does it. If look over additional considerations and perform more from there.

  1. Log onto the machine as local administrator and confirm the login is successful

  2. Go to Control Panel | System | Advanced system settings | Advanced tab | User Profiles section | Settings

  3. Highlight and delete all Account Unknown accounts and any other accounts one-by-one other than Default Profile and the local administrator account you are signed on as now. enter image description here

  4. Run the below PowerShell elevated and let it finish

    PowerShell Elevated

    Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\*' | % {
        New-ItemProperty -Path $_.PSPath -Name StateFlags0001 -Value 2 -PropertyType DWord -Force
    };
    Start-Process -FilePath CleanMgr.exe -ArgumentList '/sagerun:1' 
    
  5. Run the below DISM.exe processes admin elevated below one by one until they all complete.

    DISM.exe /online /Cleanup-Image /StartComponentCleanup
    DISM.exe /online /Cleanup-Image /SPSuperseded
    DISM.exe /online /cleanup-image /restorehealth
    

Additional Considerations

  • Purge HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows keys before running sysprep to blow away any registry set policies which may be set

  • Look over gpedit.msc and look for and set any policies set to Not Configured and reboot and log back on if any were found before you run sysprep

  • Obviously you do not want the machine to be joined to any domain while being sysprep'd so ensure that's not an issue

  • Check for any services.msc services that are set to run as a domain credential and if any are found, set those to disabled, or delete software to remove, or run sc commands to delete those.

    Be sure to reboot after removing or disabling when or if found and confirm they are gone once logged back on, and then run sysprep.

  • As per advice from the Sysprep generalize fails post, look over the HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList registry keys and see if the profile for any user account there points to a drive other than C:\Users\<UserAccountName> and fix that and confirm fixed with a reboot, and then run sysprep afterwards. Look at the ProfileImagePath values for each profile GUID from those keys.