December 21 2010

SCCM report of all machines of a certain model

I needed to report all machines of a particular hardware model type. This report lists all machines of a particular hardware model (user is prompted to enter model name and is populated by a list of models found in the environment).

SQL statement:
SELECT
SYS.Name0,
SYS.Model0
FROM
v_GS_COMPUTER_SYSTEM SYS
WHERE
SYS.Model0 = @variable
ORDER BY
SYS.Name0

Prompt SQL statement:
begin
if (@__filterwildcard = '')
Select DISTINCT SYS.Model0 from v_HS_COMPUTER_SYSTEM as SYS Order by SYS.Model0
else
Select DISTINCT SYS.Model0 from v_HS_COMPUTER_SYSTEM as SYS
WHERE SYS.Model0 like @__filterwildcard
Order by SYS.Model0
end

 
 



----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.

----------------------------------------------------------------------------


Tags: , , ,

Posted December 21, 2010 by danovich in category "SMS / SCCM

Leave a Reply