Check application revision on client

Delete root\ccm namespace with PowerShell

Delete the root\ccm namespace on the local computer.

Delete the root\ccm namespace on a remote computer.

Clear SCCM Cache

Borrowed from https://sccm-zone.com/deleting-the-sccm-cache-the-right-way-3c1de8dc4b48

Using the PowerShell code below will clear the ConfigMgr cache the correct way.

Collection query for reporting

In order to add a collection prompt to a custom report you need to add an additional dataset to your report that queries for all available collections, includes the collection name and ID, and sorts the list by name.

Below an an example of the required code to retrieve all collections from ConfigMgr.

Below is the output from SSMS.

To use the query in a report you need to add a new dataset. In this example the dataset is called “AllCollections.”

Now we can add the collection query to the report and the main dataset.

In order to make a report utilize the collection query, we need to add the view v_FullCollectionMembership_Valid to the report and join it to v_R_System_valid on the ResourceID column.

Now we need to modify the main report query to take advantage of the ConfigMgr collections. This is accomplished by modifying the report to filter on a variable. You do this by checking the box next to the “CollectionID” column from v_FullCollectionMembership_Valid box.

Now we’re ready to add the filter. Under the “Filter” column in the “CollectionID” row, enter ‘=@CollID’ without the quotes.

Now when you run the query you’ll be prompted for a collection ID. In the screenshot, SMS00001, or All Systems, is used.

Results from the query.