Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING Help With SCCM query

  • Thread starter Thread starter dmcfadden2
  • Start date Start date
  • Replies Replies 2
  • Views Views 2K

dmcfadden2

New Member
Messages
3
Reaction score
0
Points
1
Hello, I have seen all kinds of sccm queries for laptop collections and so forth.

However, I am needing a query to report the following information:
1. all laptops in the sccm
2. user name of said devices
3. make and model of devices
4. computer name

Can anyone help with a query that will return all this information?

Thanks
Dan
 
Are you really looking for a SCCM query and not a report? For a Report have you looked at the builtin reports for this type of thing. They should get you close to what you are looking for.
 
SQL:
Select
comp.Name0 as [Machine Name],
comp.Manufacturer0 as [Manufacturer],
comp.Model0 as [Model],
bios.SerialNumber0 as [Serial Number],
comp.UserName0 as [User Name],
vrs.Last_Logon_Timestamp0 as [Last Logon Timestamp],
ops.Caption0 as [Operating System],
prod.Version0 as [Version],
vrs.AD_Site_Name0 as [Site]
from
v_GS_COMPUTER_SYSTEM comp inner join
v_GS_OPERATING_SYSTEM ops on ops.ResourceID=comp.ResourceID inner join
v_GS_PC_BIOS bios on bios.ResourceID=comp.ResourceID inner join
v_GS_COMPUTER_SYSTEM_PRODUCT prod on comp.ResourceID=prod.ResourceID inner join
v_R_System vrs on comp.ResourceID=vrs.ResourceID inner join
v_FullCollectionMembership on vrs.ResourceID=v_FullCollectionMembership.ResourceID inner join
v_Collection on v_FullCollectionMembership.CollectionID=v_Collection.CollectionID
where v_Collection.CollectionID='SITExxx'
 
Back
Top