Skip to content

Help with writting a query for a new collection

Featured Replies

Hi,

 

Can someome please help me with a query. I have a new collection (called MS Project REMOVAL) which I want populating with the following:

 

any machine in sccm (so look in all systems collection) with the following

 

They are not in the AD group 'MS Project' (or SCCM collection MS Project which is the same thing)

The machine name is like 'WSTN-' or 'LPTP-'

 

This is so once I remove a computer from the AD group MS Project (which removes it from the Project collection) is goes into the removal collection. This collection has an advertisement which uninstalls MS Project.

 

Thanks!!

  • 3 weeks later...

The properties for the query you are looking for are in "SystemResource". For the first condition use "SystemGroupName" with the option "is not". For the second option use the property "Name" with the options "is like" wstn% lptp%.

To add some logic you should also check if MS Project is even installed on the computer. Otherwise several hundred or thousend computers will receive the advertisement even if there is nothing to uninstall.

So add another condition by using the AddRemovePrograms class queueing for the Product ID of your project version. The AddRemovePrograms table is filled by the hardware inventory of the clients.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.