Creating collections based on boundary groups

Full disclosure, the script below is based on the script by Jonathan Lefebvre at System Center Dudes.

The script below will create a folder structure “Operational\Boundary Groups based collection”. If a collection already exists, a message is disabled on the screen, otherwise, the collection is created and move to the folder.

The goal of the changes is to make it so the script can be scheduled to run nightly or weekly. This makes the creation of collections based on boundaries no longer manual.

Results from the first run of the script.
New folder and collections created.
Results after running the script a second time.

Finding computers without a piece of software

Finding computers with a piece of software, say the Edge browser, is fairly easy with ConfigMgr. Simply create a collection that looks for the software in question and query SMS_G_System_INSTALLED_SOFTWARE.

Finding computers without a piece of software can be more difficult. The trick its to create a query that looks for computers that are NOT in the query that finds the software in question.

In the query above, we are saying give me all of the computers that are not in the results returned. So if the results returned contain a list of computers that have Edge installed, a computer not in that list would be a computer without Edge.

In order to create this query, you need to set the “Criterion Type” to SubSelected values. Then you can select the operator, which in this case is “is not in”, then either browse for or paste the subselect query.

It’s worth noting that people smarter than me recommend using ResourceId instead of NetBiosName.