There are default reports which will tell you about the count of computers in workgroup or domain and drill down further to see the device list
Hardware - General Computers in a specific workgroup or domain
OR
if computer is in workgroup or domain can be retrieved from v_r_System for reporting.
select name0 [Computer Name], Resource_Domain_OR_Workgr0
from v_R_System
you can use case statement to expand the query.
Regards,
Eswar
www.eskonr.com
If the response is helpful, please click "Accept Answer" and upvote it.