List of Random PCs by Condition

Here is a nice and simple way to get a list of Random PCs.

 

Create a query based on what you want to find, in my example Windows XP.

Then add to the query a condition to find those with a “3” as the last character in the SMSID,

Since the SMSID/GUID is HEX this will give you ~1/16 of all of those PCs.

 

select

               R.Name,

               R.SMSAssignedSites,

               R.IPAddresses,

               R.IPSubnets,

               R.OperatingSystemNameandVersion,

               R.ResourceDomainORWorkgroup,

               R.LastLogonUserDomain,

               R.LastLogonUserName,

               R.SMSUniqueIdentifier,

               R.ResourceId,

               R.NetbiosName

from 

               SMS_R_System R

where

               R.OperatingSystemNameandVersion like “%Workstation 5.1%”

               and R.SMSUniqueIdentifier like “%3”

Digg This

Leave a Reply

Your email address will not be published. Required fields are marked *