[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to pull a hardware report with SCCM 2012

Posted on 2014-08-06
13
Medium Priority
?
68 Views
Last Modified: 2016-04-12
I have sccm 2012 in my environment and I have the cm client deployed to about 6500 systems.

How can I pull a report on the system, like make, model, specs, software?

thanks
0
Comment
Question by:rdefino
  • 7
  • 6
13 Comments
 
LVL 8

Expert Comment

by:Leo
ID: 40245208
Save this code as a .mof and import it into reports.

// *********************************************************************************
//
//  Created by SMS Export object wizard
//
//  
//  File Name: all-in-one.mof
//
// Comments :
//
//
// *********************************************************************************


// ***** Class : SMS_Report *****
[SecurityVerbs(140551)]
instance of SMS_Report
{
 Category = "Department Reports";
 Comment = "";
 GraphCaption = "";
 GraphXCol = 1;
 GraphYCol = 2;
 MachineDetail = FALSE;
 MachineSource = FALSE;
 Name = "All-In-One Machine Details";
 NumPrompts = 1;
 RefreshInterval = 0;
 ReportGUID = "{435A5365-5EE2-4C85-BC2F-6A894E7A682B}";
 
 ReportParams = {
instance of SMS_ReportParameter
{
 AllowEmpty = FALSE;
 DefaultValue = "";
 PromptText = "Enter Machine Name";
 SampleValueSQL = "select Name0 from v_R_System order by Name0";
 VariableName = "MachineName";
}};
 SecurityKey = "";
 SQLQuery = "select v_R_System.Name0, v_R_System.Resource_Domain_OR_Workgr0, v_R_System.User_Name0 as Username, v_R_User.Full_User_Name0, v_R_System.AD_Site_Name0 from v_R_System, v_R_User where v_R_System.Name0 like @MachineName and v_R_System.User_Name0 = v_R_User.User_Name0 and v_R_System.User_Domain0 = v_R_User.Windows_NT_Domain0
\n
\nselect v_GS_COMPUTER_SYSTEM.Manufacturer0, v_GS_COMPUTER_SYSTEM.Model0, v_GS_SYSTEM_ENCLOSURE.SerialNumber0 from v_R_System, v_GS_SYSTEM_ENCLOSURE, v_GS_COMPUTER_SYSTEM where v_R_System.Name0 like @MachineName and  v_R_System.ResourceID = v_GS_SYSTEM_ENCLOSURE.ResourceID and v_R_System.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID
\n
\nselect v_R_System.Operating_System_Name_and0 as OperatingSystem, v_GS_OPERATING_SYSTEM.CSDVersion0 as ServicePack, v_GS_X86_PC_MEMORY.TotalPhysicalMemory0 as Memory from v_R_System, v_GS_X86_PC_MEMORY, v_GS_OPERATING_SYSTEM where v_R_System.Name0 like @MachineName and  v_R_System.ResourceID = v_GS_X86_PC_MEMORY.ResourceID and  v_R_System.ResourceID = v_GS_OPERATING_SYSTEM.ResourceID
\n
\nselect v_GS_LOGICAL_DISK.Name0 as Drive, v_GS_LOGICAL_DISK.Size0 as Size, v_GS_LOGICAL_DISK.FreeSpace0 as FreeSpace from v_R_System, v_GS_LOGICAL_DISK where v_R_System.Name0 like @MachineName and v_GS_LOGICAL_DISK.DriveType0 = 3 and  v_R_System.ResourceID = v_GS_LOGICAL_DISK.ResourceID order by v_GS_LOGICAL_DISK.Name0
\n
\nSelect v_GS_PROCESSOR.MaxClockSpeed0, v_GS_PROCESSOR.Name0,v_GS_PROCESSOR.Manufacturer0 from v_r_system, V_gs_processor where v_R_System.Name0 like @MachineName and v_R_System.ResourceID = v_GS_processor.ResourceID
\n
\nselect v_GS_ADD_REMOVE_PROGRAMS.Publisher0, v_GS_ADD_REMOVE_PROGRAMS.DisplayName0, v_GS_ADD_REMOVE_PROGRAMS.Version0 from v_R_System, v_GS_ADD_REMOVE_PROGRAMS where v_R_System.Name0 like @MachineName and  v_R_System.ResourceID = v_GS_ADD_REMOVE_PROGRAMS.ResourceID order by v_GS_ADD_REMOVE_PROGRAMS.DisplayName0";
 StatusMessageDetailSource = FALSE;
 UnicodeData = FALSE;
 XColLabel = "";
 YColLabel = "";
};
// ***** End *****
0
 
LVL 8

Expert Comment

by:Leo
ID: 40245213
0
 

Author Comment

by:rdefino
ID: 40245216
How do I access the report on sccm?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 8

Expert Comment

by:Leo
ID: 40245218
0
 

Author Comment

by:rdefino
ID: 40245223
I found the reports, and the dummies for reports. :)

But, how do I import the file?
0
 
LVL 8

Expert Comment

by:Leo
ID: 40245231
0
 

Author Comment

by:rdefino
ID: 40245235
I saved the code to a mof using notepad+ but the import tells me "it could not be compiled".

Did I save it correctly?
0
 
LVL 8

Expert Comment

by:Leo
ID: 40245243
try to run some small reports before running this, so you get an idea on how reports are run......
0
 

Author Comment

by:rdefino
ID: 40245248
I;m able to run reports, but I cannot import this report. Invalid code error.

thanks for the help
0
 
LVL 8

Expert Comment

by:Leo
ID: 40245249
whats the error?can you attach a screenshot.....
0
 

Author Comment

by:rdefino
ID: 40245253
Here it is.
Capture.PNG
0
 
LVL 8

Accepted Solution

by:
Leo earned 1200 total points
ID: 40245260
please go through this link.....there are solutions for .mof import errors........
http://blogs.technet.com/b/configurationmgr/archive/2010/01/05/the-configuration-manager-service-pack-install-guide.aspx
0
 

Author Comment

by:rdefino
ID: 40291806
Still working on it. Thanks for the link
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

868 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