This error occurs on Windows 11/10/8/7 and Windows Server operating systems and pops up during the sysprep phase. It is caused due to the operating system containing a Registry key larger than 8 kilobytes.
Windows could not finish configuring the system
To get rid of Windows could not finish configuring the system error, we have only a one fix, and that has been proven to be highly effective. While running Windows Setup, when the message appears on your screen, press Shift+F10 to open the Command Prompt. Run Command Prompt as Administrator and execute the following commands one after the other: This will open the oobe directory and then boot into the Windows operating system OOBE or Out-Of-Box-Experience. It will bring you down to the Set up Windows screen.
You will have to choose your Country or Region, Time and currency, Keyboard layout. Once done, select Next. Now, you will have to go with the flow in setting up your computer by entering your User name, password, acknowledgment to the License terms, set up Windows Updates (older than Windows 10), set up Date and Time, etc. Finally, when you are done, you need to reboot your computer. If it does not reboot, you need to Press and hold the Power button on your CPU until it goes off too. This is called as performing a Cold Boot. Turn on your computer normally now and check if that fixed your issue. Read: How to find Windows Update Size using PowerShell.