Skip to content
Create SCCM Device Collection for Visual Studio Upgrade

Create SCCM Device Collection for Visual Studio Upgrade

Written By Anoop C Nair
Last Updated August 18, 2021
Posted In SCCM
SHARE

Let’s try to create SCCM device collection for Visual Studio installed Windows PCs. You can create a dynamic device collection in Configuration Manager using Add Remove programs entries of a device. You will have to enable hardware inventory to make this work.

You can check whether the Visual Studio 2019 or 2017 application is installed on a device or not using add remove program entries. You can group all those devices into a dynamic device collection. This dynamic device collection for Visual Studio might help deploy the upgrade Visual Studio or dependency applications, etc.

I have also shared a blog post about the best way to install Visual Studio applications using SCCM. Also, there are some tips to find the device name, user name, and version details of the visual studio using SQL query.

SCCM Dynamic Device Collection

Let’s create a dynamic device collection for the device with Visual Studio 2017 & 2019 installed. You will have to consider different versions of Visual Studio if you need to use a more optimized WQL query. I have added some of those tips in the below section.

Patch My PC
  1. Navigate to SCCM console –  Assets and Compliance – Device Collections.
  2. Right-click and select “Create Device Collection” from ribbon menu.
  3. On the General page provide a Name – HTMD VS Collection.
  4. You need to be careful about Limiting collection (I don’t recommend selecting All Systems collection).
    • Choose to Browse to select a limiting collection. The collection will only contain members from the limiting collection.
  5. Click on Next to continue.

NOTE! – You can also use the same WQL query for other applications as well. But be careful about the performance issues. Also, have a look at the dynamic collection creation process best practices.

Create SCCM Device Collection for Visual Studio Upgrade
Create SCCM Device Collection for Visual Studio Upgrade

On the Membership Rules page of the Create Device Collection Wizard, in the Add Rule list. Select the type Query Rule membership rule for this collection. You can add a Rule list, select Query Rule.

On the Query Rule Properties windows, specify the following information:

  • Enter the Query Name: VS Collection.
  • Resource class: You have to select System Resource to create Dynamic Device Collection for Visual Studio in SCCM.
  • Click Edit Query Statement to Opens the Query Statement Properties dialog box.
Create SCCM Device Collection for Visual Studio Upgrade
Create SCCM Device Collection for Visual Studio Upgrade

Use the WQL query from the following section (WQL Query – Visual Studio application installed devices) to create a dynamic device collection for VS installed devices.

Create SCCM Device Collection for Visual Studio Upgrade
Create SCCM Device Collection for Visual Studio Upgrade

Collection Query to Create Visual Studio Device Collection

The following is the WQL query to group devices where the Visual Studio 2017 or 2019 version is installed. You can also edit the query as per your requirement. For example, if you want to group Visual Studio 2019 installed devices, you can try to change the query as explained below:

  • From – where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “Visual Studio %[a-z]% 201[7,9]
  • To – where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “Visual Studio Enterprise 2019
select distinct 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_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Visual Studio %[a-z]% 201[7,9]"

NOTE! – You can verify whether the collection query is correct or not by clicking on the Green play button. Verify SCCM Collection Query Preview Tool is always useful in this kind of scenario.

Create SCCM Device Collection for Visual Studio Upgrade
Create SCCM Device Collection for Visual Studio Upgrade

You can click on the OK, OK, Next, Next, and Next buttons to complete the SCCM device collection creation process for Visual Studio 2017 and 2019 installed devices.

You can check whether all these devices are sending the hardware inventory information to SCCM. All these Visual Studio installed devices will be part of the collection that we created. There is also a risk that if the device is not sending the latest application information, this collection won’t get updated, and all the relevant devices won’t be part of this collection.

Create SCCM Device Collection for Visual Studio Upgrade
Create SCCM Device Collection for Visual Studio Upgrade

Anoop is Microsoft MVP! He is a Solution Architect in enterprise client management with over 17 years of experience (calculation done in 2018). He is Blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc…..…

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read