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 Script for Sccm client online machines

Sridharrandy

Member
Messages
23
Reaction score
1
Points
3
Hi Everyone,

I need your help on the below.

Please provide me the script for taking only sccm client online machines.

How to fetch this report through script?
 
I don't think if there is a script to have only online devices, but you can have a collection with active clients (customers who are connected for 7 days (by default).
 
You can use the below script and let me know if that is what you wanted.

SQL:
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.ResourceId in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceID = SMS_R_System.ResourceID where DATEDIFF(dd,SMS_G_System_WORKSTATION_STATUS.LastHardwareScan,GetDate()) < 90)
 
Back
Top