SCCM WQL Query

Robert Jenkins 0 Reputation points
2023-05-25T16:03:58.0166667+00:00

Good afternoon! So here is what I got going on. I am attempting to pull up a WQL query within MECM for Visio 2019, trying to see how I might be able to find out whom has access the program within the last 90 days. I am not making much progress, the only thing I believe I was able to find was if the Software was still running. Anyway, this is the query I got going so far.

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 inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SoftwareUsageData on SMS_G_System_SoftwareUsageData.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName like "Visio.exe" and SMS_G_System_SoftwareUsageData.StillRunning = 1 and SMS_G_System_SoftwareFile.FileVersion like "16.%"

The only thing that I have change to this query has been and been SMS_G_System_SoftwareUsageData.StillRunning = 1. Any type of inputs or suggestions would be greatly appreciated.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,449 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,096 Reputation points
    2023-06-01T09:35:42.09+00:00

    Hello there,

    Please try to use the WMI class SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName.

    Check if the devices are inside the limited collection.

    Check-in SQL.

    Similar discussion here https://learn.microsoft.com/en-us/answers/questions/1190639/wql-query-is-not-working

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments