can somebody help me with power shell script or in any other way wherein i can get the alert when server is in hang state or it is showing blue dump.
This template seems to work ok for getting bug check/BSOD caused reboots. I recommend to apply it to a dynamic group based on Windoze hosts. Keep in mind though this is only going to alert you after the event is triggered. Its not going to detect a stale state. It may not be exactly what you're looking for.
Windows Reboot Tracker
How we gona apply this on the three monitors inside the template. please let me know the steps for doing that.
The template and component monitors are simple event ID triggers. You can put the component monitors within any template.
To save on SAM licenses you can monitor the volumes on your windows servers for the unknown state. That tells you that you are not able to query the server with WMI. I have used this successfully with my monitoring for years. Unfortunately its not full proof because if WMI has an issue it will trigger but you will be alerted when a server becomes unresponsive as well. I have found that the WMI Memory counter is more stable in terms of monitoring WMI than any other counter but need to figure out the SQL query for that one.