0

I'm trying to use SCCM to update all devices with zoom to the latest version. It runs locally under the user, so a typical { SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Zoom%" } doesn't work. The best workaround we've come up with is to search for the Zoom folder under C:\Users\ %UserProfile%\AppData\Roaming\Zoom. So far we've tried various ways of doing this without any success. Does anyone have any suggestions?

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 where SMS_G_System_SoftwareFile.FileName = "Zoom.exe" and SMS_G_System_SoftwareFile.FilePath = "C:\Users\ %UserProfile%\AppData\Roaming\Zoom"

I was expecting a report where all workstations with said folder & file would appear.

It gives the error:

ConfigMgr Error Object:
instance of __ExtendedStatus
{
    Operation = "ExecQuery";
    ParameterInfo = "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 where SMS_G_System_SoftwareFile.FileName = \"Zoom.exe\" and SMS_G_System_SoftwareFile.FilePath = \"C:\\Users\\%UserProfile%\\AppData\\Roaming\\Zoom\"";
    ProviderName = "WinMgmt";
};

Error Code:
InvalidQuery

-------------------------------
Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryException
The SMS Provider reported an error.


Stack Trace:
   at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryResultsObject.<GetEnumerator>d__75.MoveNext()
   at Microsoft.ConfigurationManagement.ManagementProvider.QueryProcessorBase.ProcessQuery(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

-------------------------------

System.Management.ManagementException
Invalid query 


Stack Trace:
   at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryResultsObject.<GetEnumerator>d__75.MoveNext()
   at Microsoft.ConfigurationManagement.ManagementProvider.QueryProcessorBase.ProcessQuery(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

-------------------------------

1 Answers1

0

What you are looking for is "Configuration Item" and "Configuration Baseline", which are created as a pair (a CI/CB) and produces a resultant membership, which can be marshalled into a collection. I will warn you that the way CM organizes this is a bit byzantine. It will take some testing and tweaking to get the concept understood properly and then set up to your satisfaction.

Googling gave me this page, which has a fair enough description to get you started:

https://www.anoopcnair.com/how-create-sccm-configuration-items-baselines/

My best shoot-from-the-hip braindump:

  1. Create the CI, which defines criteria (such as existence of a folder or file among many other possibilities, including writing your own script to use as the test)

  2. Create the CB, which uses a CI against a Collection to evaluate, which then dumps the results behind the scenes into some internal table

  3. Create the Collection (which can be done with assistance by right-clicking the CB and selecting the right context menu item) which scoops up this data into what you want (a collection of devices) based upon state data. The collection query is difficult to easily see what it's doing, because it uses referenced guids for the CI/CB as well as a state code (for compliant or non-compliant) that isn't really human-readable.

At this point you'll have what you want. But as warned before: the vagaries of setting up the CI/CB and collection are finicky. Expect to do a fair bit of googling and fiddling with the parameters before you get it right.