If you need to find all devices not currently bound to a Location, Group or System you can query the system to find these unbound devices.
1) First find all the devices and remove those with a set Location. Write the following to a text file called "unbound":
#all devices
allset = set(dmd.Devices.getSubDevices())
#devices with the Location set
boundset = set(dmd.Devices.Locations.getSubDevices())
#remove the bound devices
allset - boundset
2) Run zendmd with the "unbound" file and the output lists your unbound devices:
3) You could modify the above for Groups or System similarly. Feel free to clean it up however you need or turn it into a report.zenoss@calculon:~$ zendmd < unbound
Welcome to zenoss dmd command shell!
use zhelp() to list commands
set([<Device at /zport/dmd/Devices/Discovered/devices/
10.0.111.5>, <Device at /zport/dmd/Devices/Discovered/devices/
10.0.111.100>, <Device at /zport/dmd/Devices/Discovered/devices/
10.0.111.11>, <Device at /zport/dmd/Devices/Ping/devices/xbox>])