List of ID and Hostname of all devices

Dear All,

At the moment we are carrying out an endpoint migration process from a sophos central console A to a sophos central console B, the migration has worked perfectly for us on some selected computers, we would do this process faster if we could have a list where it shows only the hostname and ID of all devices in the sophos central console. How can we get this list?

I hope your help.