You can use this vSphere SDK for Perl cdp.pl to do so. The script allows you to specify a particular cluster, datacenter, host or vCenter and generates an html report.
Here is an example usage:
./cdp.pl --server [esx_or_esxi_or_vcenter_server_hostname] --username [USERNAME] --type [cluster|datacenter|vcenter|host]
Here is an example of running it against vCenter for all hosts:
./cdp.pl --server [esx_or_esxi_or_vcenter_server_hostname] --username [USERNAME] --type vcenter
Here is an example of running it against vCenter for a specific cluster/datacenter:
./cdp.pl --server [esx_or_esxi_or_vcenter_server_hostname] --username [USERNAME] --type cluster --cluster [CLUSTERNAME]
I'm sure there is an equivalent using PowerCLI but you'll need to wait for someone who is familiar with that tool for the snippet