This happens if the system is not got activated.
Look at the Event Viewer application error logs and you will see that it clearly states that because of no activation it is shutting down.
You can check the activation status by opening Command Prompt as an Administrator and type the following command followed by hitting the Enter key:
slmgr /dlv