WQL Query SMS Units Changes after SCCM CB 1710 Upgrade

Let us learn about the WQL Query SMS Units 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. This pose will reveal 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 170. I didn’t notice this change6“.

Patch My PC

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.

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).

Adaptiva

“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
WQL Query SMS Units Changes after SCCM CB 1710 Upgrade 1
  • 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)

Author

Anoop is Microsoft MVP! He is a Solution Architect in enterprise client management with more than 20 years of experience (calculation done in 2021) in IT. He is Blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc……………

6 thoughts on “WQL Query SMS Units Changes after SCCM CB 1710 Upgrade”

  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?

    Reply
    • 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 ?

      Reply
      • 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.

    Reply

Leave a Comment

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