Then it displayed the “Restarting” screen forever. The way I got into this state was I clicked the Reboot/Restart button in Windows Update and then responded “Yes” to the prompt of whether it was OK to restart even though other users were logged in. I had Windows 2012 R2 stuck at reboot with the spinner spinning with the screen pictured in the question. Click "Repair Windows" (but not "Install Windows").Select your language, keyboard layout and click Next.Windows Setup will show up from USB drive.
You may have to tell the BIOS to boot from USB disk.Plug the USB drive into the frozen computer.Prepare a recovery disk using Microsoft Media Creation Tool.Plug an empty USB flash drive (> 4 GB) into a healthy computer.Select a good known restore point and click Restore.Select Troubleshoot > Advanced Options > System Restore.If F8 key has no effect, force-restart your computer 5 times. Restart computer and press F8 several times to enter Safe Boot Menu.Turn off computer, disconnect power cord and restart after a few minutes.Disconnect peripherals and cold restart.Useful steps (always good to check first):