Sccm Query Domain Joined
Here are some useful queries for system center configuration manager that you can use to create collections.
Sccm query domain joined. Select 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 where sms r system resourcedomainorworkgroup workgroup there ya go. The v fullcollectionmembership view is joined to the v collection view by using the collectionid column. Sccm comes with built in collections however you may need to create collections based on requirements.
It s useful in an environment where you have devices joined to multiple domains. Use this query in an sccm collection and it will give you all workgroup machines. This query requires that the sccm client is installed and hardware inventory is turned on.
Set the working directory and run the ccmsetup command line ccmsetup exe mp management point fqdn smssitecode 001 smsmp management point fqdn dnssuffix domain suffix validate management point configuration and communication. If you are looking for a sccm device collection to group all domain controllers in your setup you are at right place. Nothing too special about this post just a query statement.
Open a command prompt as administrator. The following query lists the resources in the configuration manager hierarchy that are in a collection the assigned site for client computers the collection id collection name and the last time the collection was refreshed. Copy the source of sccm client locally on the computer.
Sometimes all you need a quick query to create device collections in configuration manager. Select from sms r system inner join sms g system computer system on sms g system computer system resourceid sms r system resourceid where sms g system computer system domain domain name source. This query will give you a device collection based on a domain name.
These collections demonstrate different queries you can use to create all the collection you need. For more information about how to use join operations see the sql server documentation. Simply copy and paste these into the sccm query statement of the query rule.