There are so many prior discussions about "Windows doesn't shut down" plus you didn't reveal all the details for others to see what version Windows, what's running at the time and what changed since it worked.
I know you find it frustrating but for a test (remember this area is so well discussed I keep it short) you boot Safe Mode and if that works then you compare what's different from Safe Mode to normal.
Bob
I have a PC that will not shut down. It sits at the "Shutting down" screen until I hardboot it. I have a batch file that runs the shutdown at night, and it just sits at that "shutting down" all night long. Now if I click shutdown on the start menu, it shuts down without issues. I cant figure out what is causing the issue, I run the same batch file on another PC and it never hangs.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic