Getting Device Name

I have the IP of devices but how do I find the device name? These devices (printers) are shares of a server.