Solved

SCCM 2007 report/query

Posted on 2014-03-24
5
588 Views
Last Modified: 2014-03-28
Please advise on a Microsoft System Center 2007 report/query.

I'd need the following data: Computer name, Operating system, Manufacturer, Model, Subnetmask,UserName, Number of days since discovery, Number of days since inventory.

Please advise howto do this.
J.
0
Comment
Question by:janhoedt
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Leon Taljaard
ID: 39950933
0
 

Author Comment

by:janhoedt
ID: 39952621
Thanks but no, sorry, doesn't help me a lot.
I'm not familiar with these queries. Even a copy paste of the query resulted in errors within SCCM 2007.
0
 
LVL 8

Expert Comment

by:Leon Taljaard
ID: 39952642
Hi

This link http://technet.microsoft.com/en-us/library/dd334578.aspx I don't have SCCM 2007 but if I create this in my SCCM 2012 I get a last HW scan report for all of my machines.

Not sure if you are also familiar with report builder, you can also use this to create your own custom reports.

You can also look at a solution similar from Experts Exchange

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/Q_27158708.html

Often the extra things you require need some more customizing.

Here is a few more

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 where ResourceId in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceID = SMS_R_System.ResourceId where DATEDIFF(dd,SMS_G_System_WORKSTATION_STATUS.LastHardwareScan,GetDate()) > 30) or ResourceId not in (select ResourceID from SMS_G_System_WORKSTATION_STATUS) 

Open in new window

But  if you are looking for the clients status based on its discovery method,here you go with report:

select a.Name0,b.AgentName,b.AgentTime from v_R_System a
 join v_AgentDiscoveries b on b.ResourceId=a.ResourceId where
 (AgentName  like 'Heartbeat Discovery' and DATEDIFF(Day,AgentTime,Getdate())>=30 ) OR
 (AgentName  like 'SMS_AD_SYSTEM_DISCOVERY_AGENT' and DATEDIFF(Day,AgentTime,Getdate())>=30 )

Open in new window


Thanks
0
 

Author Comment

by:janhoedt
ID: 39952657
Thanks.

The joins ring a bell, inner join etc also. I'd love to dive into it and I will certainly but
can you help me with creating this report?

Your first query gives an error, the second gives an output I actually don't need.

I'm looking for a report with the following fields:

Computer name
Operating system
Manufacturer
Model
Subnetmask
User name
Number of days since discovery
Number of days since inventory



J.
0
 
LVL 8

Accepted Solution

by:
Leon Taljaard earned 500 total points
ID: 39952854
Ok no problem

Try this and see what you get, the user Name might not be 100% but it will give you a start

SELECT DISTINCT 
                      a.Name0 AS 'Computer Name', a.Operating_System_Name_and0 AS 'Operating System', b.AgentName, v_GS_COMPUTER_SYSTEM.Manufacturer0 AS 'Manufacturer', 
                      v_GS_COMPUTER_SYSTEM.Model0 AS 'Model', v_GS_NETWORK_ADAPTER_CONFIGURATION.IPSubnet0, b.AgentTime, 
                      v_GS_WORKSTATION_STATUS.LastHWScan AS 'Last Inventory Scan', v_GS_SYSTEM_CONSOLE_USAGE.TopConsoleUser0
FROM         v_R_System AS a INNER JOIN
                      v_AgentDiscoveries AS b ON b.ResourceId = a.ResourceID INNER JOIN
                      v_GS_COMPUTER_SYSTEM ON a.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID INNER JOIN
                      v_GS_WORKSTATION_STATUS ON a.ResourceID = v_GS_WORKSTATION_STATUS.ResourceID INNER JOIN
                      v_GS_NETWORK_ADAPTER_CONFIGURATION ON a.ResourceID = v_GS_NETWORK_ADAPTER_CONFIGURATION.ResourceID INNER JOIN
                      v_GS_SYSTEM_CONSOLE_USAGE ON a.ResourceID = v_GS_SYSTEM_CONSOLE_USAGE.ResourceID
WHERE     (b.AgentName LIKE 'SMS_AD_SYSTEM_DISCOVERY_AGENT') AND (v_GS_NETWORK_ADAPTER_CONFIGURATION.IPSubnet0 NOT LIKE 'NULL'

Open in new window

)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have encountered the following problem while installing and configuring a Microsoft Search Server (actually it was a MSSO Express 2008, but I think it is applicable to other versions as well). Since I did not find an answer and I found an original…
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question