If your running clusters with a bunch of hosts in them you probably had the need at one point for a script like this. So what does this puppy do? It will look at your clusters and then the hosts and verify if each host can see the datastore. You might have one host that cannot see a particular datastore and is causing you issues with migrations or DRS. You other option is to do this manually by looking at each host and checking the datastores via the vSphere client.
I would recommend you save yourself a bunch of time and gray hairs and use this great script that was written by LucD. You can get some more details about this script and download it from his blog here.
About Brian Suhr
Brian is a VCDX5-DCV and a Sr. Tech Marketing Engineer at Nutanix and owner of this website. He is active in the VMware community and helps lead the Chicago VMUG group. Specializing in VDI and Cloud project designs. Awarded VMware vExpert status 6 years for 2016 - 2011. VCP3, VCP5, VCP5-Iaas, VCP-Cloud, VCAP-DTD, VCAP5-DCD, VCAP5-DCA, VCA-DT, VCP5-DT, Cisco UCS Design