Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to find SP2 clients 2

Status
Not open for further replies.

longlivegoku

IS-IT--Management
Feb 13, 2002
193
US
I'd like to be able to track our SP2 deployment progress. I have created a sub-collection called SP2 but have no idea how to setup a membership rule or query to get clients that have sp2 into it. Can someone help with this?

Thanks,

Ed

 
Here's one I recently created:
[tt]
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites,
SMS_R_System.IPAddresses, SMS_R_System.IPSubnets,
SMS_R_System.OperatingSystemNameandVersion,
SMS_G_System_OPERATING_SYSTEM.CSDVersion,
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 inner join
SMS_G_System_OPERATING_SYSTEM on
SMS_G_System_OPERATING_SYSTEM.ResourceID =
SMS_R_System.ResourceId where
SMS_R_System.OperatingSystemNameandVersion like "%Workstation 5.1%" and
SMS_G_System_OPERATING_SYSTEM.CSDVersion = "Service Pack 2"
[/tt]
 
I'm assuming this is a query lol. I don't do much, or haven't done much, with them. Can you explain how to use this? I don't do much with SQL or anything like that so haven't been exposed thus far.

Thanks.

 
[ul]
[li]Go to the properties of the collection[/li]
[li]Click on the "Membership Rules" tab[/li]
[li]Click on the "New Query" button (yellow cylinder)[/li]
[li]Name the query[/li]
[li]Click on the "Edit Query Statement" button[/li]
[li]Click on the "Show Query Language" button[/li]
[li]Copy and paste the following code in to the "Query statement" box:
[tt]
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
inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId
where SMS_R_System.OperatingSystemNameandVersion like "%Workstation 5.1%" and SMS_G_System_OPERATING_SYSTEM.CSDVersion = "Service Pack 2"
[/tt][/li]
[li]Click "OK"[/li]
[li]Click "OK"[/li]
[li]If you want the collection updated automatically be sure to use "Update this collection on a schedule"[/li]
[/ul]

My first post was from a query I created (copied from a similar query), and the code above was from a collection I created, copied from a similar collection. The SQL is a little easier to copy and paste rather than going through all of the steps to select each attribute you want and the particular criteria.
 
Thanks very much for taking time for the SMS newbies. Much appreciated!

Ed

 
Thanks also for the post. worked like a charm!

thanks,

Dave
 
I still consider myself a newbie in SMS. Looking at the built-in collections/queries helps a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top