You can run a pingsweep, and then use use wmi to get the computer name from the win32_computersystem class on anything that answers a ping. Not sure how you'd go about getting the host names from non-windows devices.
You can run a pingsweep, and then use use wmi to get the computer name from the win32_computersystem class on anything that answers a ping. Not sure how you'd go about getting the host names from non-windows devices.