Query Workstations SCCM

Our Score
Click to rate this post!
[Total: 0 Average: 0]
Fox x64 bit workstations:
</pre>
<span class="crayon-e ">select *</span> <span class="crayon-e">from </span><span class="crayon-e">SMS_R_System </span><span class="crayon-e">inner </span><span class="crayon-e">join </span><span class="crayon-e">SMS_G_System_COMPUTER_SYSTEM </span><span class="crayon-e">on </span><span class="crayon-v">SMS_G_System_COMPUTER_SYSTEM</span><span class="crayon-sy">.</span><span class="crayon-v">ResourceID</span> <span class="crayon-o">=</span> <span class="crayon-v">SMS_R_System</span><span class="crayon-sy">.</span><span class="crayon-e">ResourceID </span><span class="crayon-e">where </span><span class="crayon-v">SMS_G_System_COMPUTER_SYSTEM</span><span class="crayon-sy">.</span><span class="crayon-v">SystemType</span> <span class="crayon-o">=</span> <span class="crayon-s">"x64-based PC"</span></div>
<div class="crayon-line">
Or use the one from this Technet post

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 inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like “%7%” and SMS_R_System.Client = 1 and SMS_R_System.Obsolete = 0 and SMS_G_System_COMPUTER_SYSTEM.SystemType = “x64-based PC”

If you dont want to filter obsolete and client installed machines remove ” SMS_R_System.Client = 1 and SMS_R_System.Obsolete = 0 and”

For x86 workstations:

 

select *  from  SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.SystemType = “X86-based PC”
Our Score
Click to rate this post!
[Total: 0 Average: 0]

Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.