Create Custom SCCM WQL Query

Boopathi S 3,866 Reputation points
2021-11-19T20:08:51.417+00:00

Hi Team,

I am asked to create a report to generate list of computers type as Desktop and Laptop. I am using report builder for the same.

151058-image.png

Created the below query to test it before creating the report.

select distinct SMS_R_System.Name, SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_G_System_COMPUTER_SYSTEM.Model, SMS_G_System_PC_BIOS.SerialNumber, SMS_R_System.LastLogonUserName, SMS_G_System_OPERATING_SYSTEM.Caption, SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes, SMS_G_System_WORKSTATION_STATUS.LastHardwareScan from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceId = SMS_R_System.ResourceId

151122-untitled.jpg

How do I modify the above query that device type as Desktop or Laptop using chassis Type.

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rahul Jindal 11,511 Reputation points
    2021-11-19T22:20:53.417+00:00

    Add a where condition to filter out the relevant chassis. You can find details at the link below. It is a little old but will get you started.chassis-type-values-in-sccm

    0 comments No comments

  2. Garth Jones 1,366 Reputation points
    2021-11-19T22:36:51.04+00:00

    You can't modify that wql query to do that. You will need to write a Sql query and Sql report for that.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.