If you’re responsible for managing Office 365 deployments within your organization, having visibility into which channels your devices are using is crucial for effective administration and maintenance. With the help of SQL queries, you can extract pertinent information from Configuration Manager data, allowing you to generate insightful reports or visualize data using tools like Power […]
Query
SCCM – SQL Queries for Make, Model and Architectures of Devices
These simple SQL queries can be used to pull data from the Configuration Manager database to provide you with a count of all make, model and architecture devices in your business. Instructions To get this information, open a new query within SQL Server Management Studio and copy and paste the query that you wish to […]
30 Useful SCCM SQL Queries
I’ve been creating a lot of collections with our SCCM recently, so I thought I would share the ones we thought were most useful: Show all computers in SCCM: Show all computers with a specific name: Show all computers with a specific operating system: Show all computers with a specific IP address: Show all installed […]
SCCM Collection Query for Devices with specific software installed and version or below [2023 Updated]
If you need to identify machines with specific software installed on a device but would also like to know whether they have a certain version of the stated software or below, then you can use the below query. This can help with software upgrades to identify machines that have not yet been upgraded. SCCM Collection […]
How to Automatically Remove Spotify using SCCM [2022 Updated]
How to automatically uninstall Spotify installations using System Center Configuration Manager (SCCM).
SCCM Collection Query for Virtual Machines
Just a quick post to add to our list of SCCM collection queries. We needed one today for a collection of virtual machines only. This query you can use to create a collection to do this: You can check out our other SCCM collection queries by following this link.
SCCM Query for Microsoft Server 2019
I’ve not done a post about SCCM queries for a while now so in addition to a load I did some time ago, I thought I’d bring things up to date with a few new queries starting with Microsoft Server 2019. I’ve been using this one for creating a Windows Server 2019 collection in SCCM […]
SQL Query to find members of an Active Directory Security Group
We recently helped out with a data migration which included creating a completely new set of Active Directory security groups. They wanted all the members to have the same level of access but wanted all the new security groups to have a matching standard. So we needed to create all the new security groups and […]
SCCM – Active Directory Security Group Query for User Collection
If you are looking at setting up a SCCM user collection based on membership of an Active Directory Security Group, then you can use this WQL query for the collection. WQL Script To set this up, create a new collection and copy and paste this as its query: Variables You can add or remove any […]
SCCM – Create a device collection based on Exchange Server role
Following on from our recent posts for Configuration Manager collection queries, we have another one here for all devices that are Microsoft Exchange servers. Go ahead and create a new device collection and then use this query: select * from SMS_R_System inner join SMS_G_System_SERVICE on SMS_G_System_SERVICE.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SERVICE.Name like “Microsoft Exchange%” Save the […]
SCCM – Create a device collection based on Domain Controller role
We have another WQL query here for you today to enable you to create a Configuration Manager collection based on whether a device is used as a domain controller. Go ahead and create a new device collection and then use this query: Save the query and you should now see a collection of all your […]
SCCM – Hardware and Client Version SQL Query
If you are looking for a SQL query to pull back hardware inventory information and the SCCM client version, then you can use the below to pull all this information together. SELECT S.Name0 as Name, S.Client_Version0 as [Cient Version], OS.Caption0 as [Operating System], CS.Manufacturer0 as Manufacturer, CS.Model0 as Model, PB.SMBIOSBIOSVersion0 as BIOS, PR.Name0 as CPU, […]