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!

SOLVED Sccm Custom report

  • Thread starter Thread starter SME
  • Start date Start date
  • Replies Replies 3
  • Views Views 3K
Status
Not open for further replies.

SME

New Member
Messages
2
Reaction score
0
Points
1
Hi !

Im trying to create custom report for computers that dont have skype installed.
Im not very good at SQL, but friendly google helped.

This is what i have:

---
Select Distinct
sys.Netbios_Name0,
sys.User_Domain0,
sys.User_Name0

FROM
v_R_System sys
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
WHERE
sys.ResourceID not in (select sys.ResourceID
from
v_R_System sys
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
where
DisplayName0 like '%Skype%')
---


It runs against all sccm collections but how could i run this against specific collection ?

Any help is appreciated :)
-
SME
 

Thanks !
That did the trick.
I got the lines i needed for specific program and specific collection ID (without parameters) and the final working version is like this:

***
Select Distinct
sys.Netbios_Name0,
sys.User_Domain0,
sys.User_Name0

FROM
v_R_System sys
join v_FullCollectionMembership fcm on fcm.resourceid=SYS.ResourceID
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
WHERE
sys.ResourceID not in (select sys.ResourceID
from
v_R_System sys
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
where
DisplayName0 like '%Skype%')
and
fcm.Collectionid= 'Collection ID here'
***
 
Status
Not open for further replies.

Forum statistics

Threads
7,142
Messages
27,884
Members
18,179
Latest member
Wjelana
Back
Top