SMSUG.ca

...your virtual communITy
Welcome to SMSUG.ca Sign in | Join | Help
in Search

Garth Jones

What is the average number or items within the Add/Remove Per PC?

During a resent discussion within the mailing list this request was posted.

 

“I need to run a report of all software installed for each computer in a specific collection (or an AD site..Whichever)…   Similar to the “Summary of Installed Software in a Specific Collection” report that comes with SP2, but rather than a summary, I want each computer name listed, with all installed software for each computer”

 

The report in question would look something like this

COMPUTER1       App1

COMPUTER1       App2

COMPUTER1       App3

COMPUTER2       App1

COMPUTER2       App2

COMPUTER2       App3

 

The problem I have with this is: Based on the average number or items with in my test database, each PC would have 186 rows! This makes this report unusable! However management and auditor continue to ask for this type of report without knowing what it really means.

 

What they should be asking for is a high level count of all applications, then be able to drill down to a list of PCs with that application.

 

So what is your average number of rows per PC?

 

SELECT Count(v_GS_ADD_REMOVE_PROGRAMS.DisplayName0) AS 'Count0'

into #avge

FROM v_GS_ADD_REMOVE_PROGRAMS v_GS_ADD_REMOVE_PROGRAMS, v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM

WHERE v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_ADD_REMOVE_PROGRAMS.ResourceID

GROUP BY v_GS_COMPUTER_SYSTEM.Name0

 

select avg(count0) from #avge

drop table #avge

 

 

BTW if really want to kill a few trees here is the query that will produce the huge report requested above.

 

 SELECT v_GS_COMPUTER_SYSTEM.Name0,

            v_GS_ADD_REMOVE_PROGRAMS.DisplayName0,

            v_GS_ADD_REMOVE_PROGRAMS.ProdID0,

            v_GS_ADD_REMOVE_PROGRAMS.Publisher0,

            v_GS_ADD_REMOVE_PROGRAMS.InstallDate0

FROM

            v_CM_RES_COLL_SMS00001 v_CM_RES_COLL_SMS00001,

            v_GS_ADD_REMOVE_PROGRAMS v_GS_ADD_REMOVE_PROGRAMS,

            v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM

WHERE

            v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_ADD_REMOVE_PROGRAMS.ResourceID

            AND v_GS_COMPUTER_SYSTEM.ResourceID = v_CM_RES_COLL_SMS00001.ResourceID

Order by

            v_GS_COMPUTER_SYSTEM.Name0,

            v_GS_ADD_REMOVE_PROGRAMS.ProdID0

Published May 31 2007, 07:46 AM by Garth
Filed under: , , ,

Comments

 

Garth Jones said:

It took 2 hours, 4 minutes and 8 second to return 524031 rows from a db with ~3500PCs and isqlw.exe...
May 31, 2007 7:39 AM
 

Stuart A. Norman said:

In my corner of the world I get asked to report on how many different versions of specific products are
May 31, 2007 8:26 AM
 

Garth Jones said:

It has been a while since I did my top 25 post. There are some interesting results.
 



...
September 6, 2007 8:03 AM
 

Garth Jones said:










  




















 Total
 
 Title...
December 30, 2007 2:06 PM
 

mbartosh said:

Garth, I tried your sql query to create a report that returns a count of all applications, and then drills down to a list of PCs.

Here it is:

SELECT Count(v_GS_ADD_REMOVE_PROGRAMS.DisplayName0) AS 'Count0'

into #avge

FROM v_GS_ADD_REMOVE_PROGRAMS v_GS_ADD_REMOVE_PROGRAMS, v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM

WHERE v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_ADD_REMOVE_PROGRAMS.ResourceID

GROUP BY v_GS_COMPUTER_SYSTEM.Name0

select avg(count0) from #avge

drop table #avge

The problem is that it did not return any data?

March 18, 2008 3:01 PM
 

mbartosh said:

I tried building a report with the query above and no data was returned?

SELECT Count(v_GS_ADD_REMOVE_PROGRAMS.DisplayName0) AS 'Count0'

into #avge

FROM v_GS_ADD_REMOVE_PROGRAMS v_GS_ADD_REMOVE_PROGRAMS, v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM

WHERE v_GS_COMPUTER_SYSTEM.ResourceID = v_GS_ADD_REMOVE_PROGRAMS.ResourceID

GROUP BY v_GS_COMPUTER_SYSTEM.Name0

select avg(count0) from #avge

drop table #avge

Sorry if this was submitted twice.

March 18, 2008 3:25 PM
 

Garth said:

You are creating report for this, correct? Remember this is SQL not WQL, which is needed for queries within the console.

BTW I just test the SQL Query above and it return "100" for my small test lab.

March 31, 2008 1:52 PM
 

Garth Jones said:

During a discussion on the myITforum ConfigMgr /SMS mailing this statement was made “ It’s never bad

August 14, 2008 8:22 AM
 

Garth's Blog said:

During a discussion on the myITforum ConfigMgr /SMS mailing this statement was made “ It’s never bad

August 14, 2008 8:59 AM
 

All Software Installed - need to run the same report 170 times? | keyongtech said:

Pingback from  All Software Installed - need to run the same report 170 times? | keyongtech

January 18, 2009 10:56 AM
 

Enhansoft said:

How to Perform a Basic Software Audit

May 27, 2010 11:18 AM

This Blog

Syndication

News

Training

Powered by Community Server (Non-Commercial Edition), by Telligent Systems