WQL Query SMS Units Changes after SCCM CB 1710 Upgrade

7
Query WQL Changes After SCCM CB 1710 upgrade

One of my colleagues reported an issue that their custom queries are not working as expected after SCCM 1710 upgrade. They have a production query to clean up devices with less than 2048 MB disk-space, and after the SCCM CB 1710 upgrade, it stopped working as expected. In this post, we will look into more details of WQL Query and “SMS Units” Changes after SCCM CB 1710 Upgrade.

The changes also affect SQL views, but I don’t see any direct impact on SCCM clients and infrastructure with these changes. I do agree that these changes are more logical as the Hard Disks are coming with GBs and TBs in size. I didn’t notice this change in my previous video post “Differences Between SCCM ConfigMgr CB 1710 and 1706“.

What is WQL Query?

You can use WQL query to access WMI data from the system. WMI got introduced with Windows 2000. In a layman language, WMI is the database, and it stores data about Windows resources like software and hardware. SCCM collection queries are based on WQL.

Query WQL Changes After SCCM CB 1710 upgrade

What is SMS_Units?

SMS_Units is the string informs the Inventory Agent to perform a conversion between data provided by WMI into a form SMS can handle. The following example is valid until SCCM CB 1710 release. Once you are upgrade to 1710 then, this Megabytes will change to Gigabytes.

Example: SMS can’t handle 64-bit integers, so in the case of disk size, we use the qualifier: SMS_Units(“Megabytes“) and the agent will translate the raw # of bytes returned by WBEM into the appropriate representation in megabytes.

What is Changed in SCCM CB 1710?

As per the Microsoft SCCM product team’s updated documentation, there is a revision happened with SCCM CB 1710 release with Inventory default unit (SMS_units).

“As devices now include hard drives with sizes in the gigabyte (GB), terabyte (TB) and larger scales, this release changes the default unit (SMS_Units) used in many views from megabytes (MB) to GB. For example, the v_gs_LogicalDisk.FreeSpace value now reports GB units.”

The SMS_Units(“Gigabytes”) is used in different views, and we should take care of those views to notice the differences. One of the sample WQL query samples is given below. This WQL query example includes new changes in SMS_Units.

select * from SMS_R_System inner join SMS_G_System_DISK on SMS_G_System_DISK.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.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_PROCESS on SMS_G_System_PROCESS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.Size = 256 and SMS_G_System_PROCESS.PeakVirtualSize = 10 and SMS_G_System_PC_BIOS.BIOSVersion > "1.0" and SMS_G_System_LOGICAL_DISK.FreeSpace < 25

Values Changed in WQL Query after SCCM CB 1710 Upgrade

Query WQL Changes After SCCM CB 1710 upgrade

Example WQL Query Crieria/s which I checked
Object Type ==> System Resource
Criterion Type ==> Simple Value
Where ==> Logical Disk - Size (GB)
Where ==> Logical Disk - Free Space (GB)
Where ==> Process - Peak Virtual Size (GB)

7 COMMENTS

  1. I noticed this recently after 1710 upgrade as we had created a report which pulls drive size and available size information which was earlier in MB and now changed to GB. But there is one problem, for few drives it is showing on GB and for few it is showing in MB. For ex- if server have 5 drives, 1 is showin size in MB and other 4 in GB. What can be the issue? Can you help?

    • I have the same problem, within view v_GS_LOGICAL_DISK, I can see some disks still using MB unit, most of the others disks are now in GB. SCCM is showing correctly everything in GB so I guess there should have somewhere the unit used for the resourceid. Anybody has an idea ?

      • Yes, Some disks are still using MB as all your clients are not upgraded to SCCM CB 1710 version (my assumption). I assume, once all your SCCM clients are upgraded to the latest version of CB then, you would be able to see only GB.
        Does that make sense?

      • My mistake, even SCCM client is not displaying correctly the disks for which the capacity is still saved in MB in the database. I don’t think it is something about the client deployed because for the server in example all the disks are correctly in GB and only one is still in MB. It’s probably an issue with the refresh of the value of that disk.

  2. I am on build 1806 and my still show MB in the resource explorer. However the values are a mix of GB and MB. All my agents are the 1806 build, and Hardware inventory has be ran across the board. What do you have to do for these values to be consistent.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.