SCCM Report primary device for user 1

SCCM Report primary device for user

So a customer of mine wanted a report from configuration manager to list primary devices for their users.

Here is the SQL query I used to create this report.

select

 vru.Name0 as [User Name],
 vrs.Name0 as [Computer Name]
 from
 v_UsersPrimaryMachines upm
 left join v_R_User vru
 on upm.UserResourceID = vru.ResourceID
 left join v_R_System vrs
 on upm.MachineID = vrs.ResourceID

 WHERE vru.Name0 != 'Null'

 order by vrs.Name0

Anders Rødland

Anders Rødland started his IT career in 2006. My main focus is MS Configuration Manager and client management, and I have passed 17 Microsoft certifications since then. My main expertise is on client management with Microsoft Endpoint Manager: Intune and Configuration Manager. I also do a lot of work on the security side with Microsoft Defender for Endpoint. In addition to my Microsoft certification, I also have an ITIL v3 Foundation certification. This is my private blog and do not represent my employer. I use this to share information that I find useful. Sharing is caring.

2 thoughts to “SCCM Report primary device for user”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.