I would suspect after a power outage your disk may have some corruption which stops it behaving normally on shutdown request. It would be a good idea to run chkdsk. Can I assume you know how to get to the tools tab of disk properties on the C: drive?
Then click the 'check now' button and clear both options so it will run right away and tell you immediately if there are problems or not.
If there are, you can then run chkdsk /r to attempt corrections, and maybe chkdsk /f if things look really bad. /f can take maybe hours. In both cases you will have to start from a recovery bootup command line, and again you might know how to do that. If not we'll carry on after you report back.
Second thing is to run Disk Cleanup. You do that by pressing windows key and just typing
disk in the search box, select Disk Cleanup. But what we see in there can change quite a lot depending upon what sort of files are left over, so just do that without cleaning anything the first time, and can you list what each line says and the space reported ?
For example
Downloaded program files 0 bytes
Temporary Internet files 1.49Mb
and so on........it's the unusual ones I want to know about.
Thirdly, download and run CCleaner without actually doing anything (so it's safe) it would be good to do the registry checks (one by one, not all at once). There is a single button for Registry cleaning. report back any unusual errors discovered
Fourthly, (from the internet)
run cmd.exe (as a admin)
type the following command:
powercfg.exe /energy
it will generate a report that you can view in notepad. The report will indicated why the system did not shutdown. Services like a shared media player can block the computer from sleeping.
Fifthly, try
http://www.thewindowsclub.com/windows-will-not-shut-down
BTW just press windows key and type
winver to discover your OS SP status.