Home > SCCM Reports > SCCM Reports – Computers for a specific user name & domain

SCCM Reports – Computers for a specific user name & domain


In my experience I have found that the canned "Computers for a specific user name" does not work for everything if you have a mixture of domain types.  For example this helped in a situation where one division of a company used a Windows NT 4.0 domain and the other divisions were Windows 2003 or greater.  Disparate infrastructure is one of the joys of acquisitions and mergers.

The "SQL Statement" is as follows and the "Prompt" after…
 
SQL Statement
SELECT  CS.UserName0, SYS.Netbios_Name0,
        Operating_System_Name_and0, SYS.Resource_Domain_OR_Workgr0
FROM v_GS_COMPUTER_SYSTEM CS
JOIN v_R_System SYS on SYS.ResourceID = CS.ResourceID
WHERE CS.UserName0 LIKE @variable
ORDER BY CS.UserName0, SYS.Netbios_Name0
 
Prompt ("Name" = variable)
begin
 if (@__filterwildcard = ”)
  SELECT DISTINCT CS.UserName0 from v_GS_COMPUTER_SYSTEM CS Order by CS.UserName0
 else
  SELECT DISTINCT CS.UserName0 from v_GS_COMPUTER_SYSTEM CS
  WHERE CS.UserName0 like @__filterwildcard
  Order by CS.UserName0
end
 
Advertisements
Categories: SCCM Reports
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: