Link to home
Start Free TrialLog in
Avatar of janhoedt
janhoedt

asked on

SCCM 2007 report/query

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.
Avatar of Leon Taljaard
Leon Taljaard
Flag of South Africa image

Avatar of janhoedt
janhoedt

ASKER

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.
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

https://www.experts-exchange.com/questions/27158708/SCCM-2007-R3-custom-report-showing-last-hardware-scan-date-last-boot-up.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
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.
ASKER CERTIFIED SOLUTION
Avatar of Leon Taljaard
Leon Taljaard
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial