After the latest Win8.1x64 Updates, my system got stuck restarting or shutting down..
I found the answer by using Google into StackExchange. Turns out this is a more common problem than I thought, affecting multiple versions of Windows starting with Vista. After reading all the posts I could find there was one common theme: Memory management.
For my situation it turned out to be a paging file problem.
The solution that worked is pretty simple:
Click on the Start button (I use Classic Shell so it looks like a Windows 7 menu), then right-click on This PC and select Properties. Click on Advanced System Settings, then the Advanced tab and select Performance Settings, then pick the Advanced tab. Under Virtual Memory select Change.
Set it to No paging file. Then OK, OK, OK.
Shut down. Even if it means waiting 30 seconds after it closes apps and services and disk activity stops then using the power button.
When the system comes back up, do it all again but this time select System managed size.
Then another shutdown and startup.
It made a big difference. Apparently it just needed to rebuild the paging file.
Problem solved for me.
(Which kinda begs another question: My system is 16 GB RAM and I tend to use about half of that so I wonder why Windows needs it at all? But that's a question for another day. Or not. System managed is fine)