Find all Obsolete computerobject in SCCM 2007

When you have a big Microsoft SCCM 2007 environment, it’s very handy to have an overview of all the obsolete computerobject within the SCCM database. This query gives you this overview.

1.) Create a new Collection. (In my example it is All Obsolete Computerobjects)
2.) Create a new query. (In my example it is Query All Obsolete Computerobjects)
3.)  Edit the query statement. Use the following query:
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.Obsolete = 1

4.) Run the “Update Collection Membership”
5.) View the result