|
|
Re: master document of queries for SCCM collections
Posted: Fri, Dec 18, 2009 2:35 PM :: Rank: 54 |
Author
|
|
|
Points: 40804
Level: System Center Expert |
Thank you for your rating!
|
Hey this is a cool one, even if you don't have a big list send them into us here at SCC and we will complie them in to a useful doc.
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Fri, Dec 18, 2009 3:54 PM :: Rank: 86 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
I will contribute some of the collection queries I have to this. Should I blog them or post them right here?
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
Re: master document of queries for SCCM collections
Posted: Fri, Dec 18, 2009 4:41 PM :: Rank: 68 |
Author
|
|
|
Points: 91
Level: System Center Enthusiast |
Thank you for your rating!
|
Or you could send them to simon at skinner.fr and Pete and I will put it together
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Thu, Dec 24, 2009 8:01 PM :: Rank: 63 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Thu, Dec 24, 2009 8:12 PM :: Rank: 62 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Thu, Dec 24, 2009 8:14 PM :: Rank: 59 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Thu, Dec 24, 2009 8:59 PM :: Rank: 54 |
Author
|
|
|
Points: 65622
Level: System Center Expert |
Thank you for your rating!
|
Good start Tommy, here's one before I get back to Christmas Dinner and family time. This collection query will show you all systems that have a particular service installed based on service NAME ..not the Display Name...(NAME is what you'd use in a 'net start' or 'net stop' command)
this one would show you all servers with the OpsMgr SDK service installed (all Management Server basically)
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.ResourceId in (select SMS_R_System.ResourceId 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 = "OMSDK")
And technically, if you throw a not in there, you could see all systems without the service
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.ResourceId not in (select SMS_R_System.ResourceId 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 = "OMSDK")
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Thu, Dec 24, 2009 9:29 PM :: Rank: 69 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
Okay, one more before I knock off...A collection query to find systems with an application installed based on the contents of Add/Remove Programs.
Here's a collection query I use to find SQL Server 2005 components installed based on display names. I think that Windows service query you just posted would be more accurate in some cases.
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.ResourceId in (select distinct SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID from SMS_G_System_ADD_REMOVE_PROGRAMS where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = 'Microsoft SQL Server 2005')
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Sat, Dec 26, 2009 9:22 PM :: Rank: 146 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
And suppose worth mentioning an example of a collection query that shows clients client that do not have an application installed. You basically just add the NOT into the query.
Here's a query to show systems without Office 2007 Professional installed.
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.ResourceId NOT in (select distinct SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID from SMS_G_System_ADD_REMOVE_PROGRAMS where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = 'Microsoft Office Professional 2007')
Again the key is to make sure the value in DisplayName at the end of the query matches what you see in Add/Remove Programs
I'll post a couple of more complex examples soon.
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Sun, Dec 27, 2009 12:20 AM :: Rank: 91 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
Here's the collection query for Windows 2008 Server systems:
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainOrWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Server 6.0%"
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Mon, Dec 28, 2009 8:45 AM :: Rank: 48 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Mon, Dec 28, 2009 10:07 AM :: Rank: 75 |
Author
|
|
|
Points: 11589
Level: System Center Expert |
Thank you for your rating!
|
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
Re: master document of queries for SCCM collections
Posted: Mon, Dec 28, 2009 5:51 PM :: Rank: 79 |
Author
|
|
|
Points: 1797
Level: System Center Specialist |
Thank you for your rating!
|
Lots of queries in the Code Repository. Plus, you can create your own code packs and share them with the community.
http://www.myitforum.com/articles/11/view.asp?id=8535
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Mon, Dec 28, 2009 6:38 PM :: Rank: 59 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
That's an interesting idea. Perhaps I will create a code pack of my queries, reports and scripts and post them here on SCC.
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Mon, Dec 28, 2009 11:42 PM :: Rank: 109 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|
|
|
RE: master document of queries for SCCM collections
Posted: Wed, Dec 30, 2009 10:56 PM :: Rank: 36 |
Author
|
|
|
Points: 42748
Level: System Center Expert |
Thank you for your rating!
|
Here's a useful collection query I used just today....got this one from Cameron
ConfigMgr Systems without Current Service Packs, and System Patch Status
|
|
| Your Reports Help Protect the Community |
|
The community depends on each member to help keep Answers a safe and positive place. Do your part by using the form below to report Q&A that violates the Community Guidelines.
|
Additional Detail(optional)
|
Report Abuse |
|