No Lucd, it will give output to all connected and disconnected hosts. I need only disconnected hosts and non-responding lists and the output will be sent to mail.
That is not what you asked for with "I am looking for a powercli script that can fetch ESXi host connection state such as Host disconnected or non responding,".
Plus now you all of a sudden have an email requirement.
Sorry, I'm not falling for these never-ending threads anymore.