System Center Configuration Manager TechCenter >
System Center Configuration Manager Forums
>
Configuration Manager General
>
OS discovery
OS discovery
- how do i do a query for all OS discovered? In other words, I know how to look for "Like %workstation 5.1%", but I want to build a query that will tell me what I do not know or aware of...
In other words, build a collection that will list and combine all records, and if possible the count as well.
Something like:
windows server 2000
windows server 2003
Windows 98 (who knows :-0)?
Thank you!
Answers
- How to build a subselect query: http://www.myitforum.com/articles/1/view.asp?id=179
which is what you just asked "show me computers that don't have something".
So I would approach it like this. First, I would not build this in Collections. This is a query, not a collection (if you need it later for a collection, you can grab the query later).
Basically, first create a query of "server 2008 that DO have DHCP service started/automatic"
then, you would create a query of "server2008 which are Not in the first query"
Follow Rod Trent's article to get your head wrapped around the concept; take it slow. The first few times can be a bit confusing, but you'll be an subselect pro in no time.
As to how; just look at existing queries, and/or start playing in the Query area of your console.
Standardize. Simplify. Automate.- Marked As Answer byEric Zhang - MSFTMSFT, ModeratorMonday, November 16, 2009 7:08 AM
- Proposed As Answer byAbhishek.JoshiMVPSaturday, November 07, 2009 11:17 AM
All Replies
- That would be the SQL version: select distinct caption0, version0 , count(version0) from v_GS_OPERATING_SYSTEM group by caption0, version0
- Torsten
Pardon my ignorance, however i am clueless in SQL free form.
Is this something I need to build out of the values, since i get an invalid statement when using the statement above. Torsten's query is for reporting not a ConfigMgr queries.
http://www.enhansoft.com/- Torsten's code was for a report, not a collection, nor for the "query" section. The reason it has to be a report is because you asked for a Count. In order to do counts of something, you need to use reporting.
Create a new report, and paste in Torsten's code (replacing the code that's there by default in the bottom window).
Oh, and because v_gs_operating_system comes from inventory, that'll only get you information on clients. You used the word "OS discovered", so there is a mild distinction between "discovered" computers and computers that are sending up hardware inventory as clients. If Torsten's report isn't quite what you meant, let us know.
Standardize. Simplify. Automate. - Thanks guys, excellent clarification regarding reporting and counts.
I would like to create a collection without a count that will list the OS discovered only as well.
I will come back here if I need more help. Thanks guys, excellent clarification regarding reporting and counts.
I would like to create a collection without a count that will list the OS discovered only as well.
I will come back here if I need more help.
There are built in collections for most operating systems. If there's not one for the OS you need just copy a built-in one and change the OS version in the query.
John Marcum | http://www.TrueSec.com/en/Training.htm | http://myitforum.com/cs2/blogs/jmarcum- I am finding most of what I need, however I winder if there is a book os source I can use to teach myself the SCCM related query language.
As an example, I was able to find out which computers run a specific OS, but now i want to create a query to find out which of them do not have specific service running, for example 2008 servers all version with DHCP service NOT running. I obviuosly need to learn much more about the language.
How? - How to build a subselect query: http://www.myitforum.com/articles/1/view.asp?id=179
which is what you just asked "show me computers that don't have something".
So I would approach it like this. First, I would not build this in Collections. This is a query, not a collection (if you need it later for a collection, you can grab the query later).
Basically, first create a query of "server 2008 that DO have DHCP service started/automatic"
then, you would create a query of "server2008 which are Not in the first query"
Follow Rod Trent's article to get your head wrapped around the concept; take it slow. The first few times can be a bit confusing, but you'll be an subselect pro in no time.
As to how; just look at existing queries, and/or start playing in the Query area of your console.
Standardize. Simplify. Automate.- Marked As Answer byEric Zhang - MSFTMSFT, ModeratorMonday, November 16, 2009 7:08 AM
- Proposed As Answer byAbhishek.JoshiMVPSaturday, November 07, 2009 11:17 AM
- Thanks Sherry.
Yes, the link you gave me was exactly it.
I followed your advice, and started cloning queries than re-do them. learning bit by bit.
BTW, I also like your BLOG.

