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“.
Table of Contents
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).
“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
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)