The aim of this article is to configure Microsoft System Centre Configuration Manager 2007 SP1 or R2 to report on the locally installed printers, this in my case is very useful for reporting on printers installed and shared on our Print Server.

The fields we will report on are Netbios name of the computer, ShareName, Driver Name, Location, Port Name and Print processor but there are several other fields you can add.

This article assumes you already have SCCM up and running

Step1: Modify SMS_Def.mof on the Server

The SMS_Def.mof file basically details what hardware information stored in WMI you want to inventory from the clients.

SMS_Def.mof can be expanded to add new reported information but in the case of local printers the SMS_Def.mof file has all the configuration we need we just need to to tell SCCM that we want to report on “Printer Devices”

Open the SMS_Def.mof file on your server normally under \\severname\sms_sitecode\inboxes\cliefiles.src\hiv

Find the SMS Group  “Printer Device”

Set the SMS_Report field just above to TRUE and set each of the feild below that you want to report on to TRUE

My SMS_Def.mof looks like the below

 

[ SMS_Report (TRUE),

SMS_Group_Name (“Printer Device”),

SMS_Class_ID (“MICROSOFT|PRINTER_DEVICE|1.0”) ]

class Win32_Printer : SMS_Class_Template

{

[SMS_Report (FALSE) ]

uint32 Attributes;

[SMS_Report (FALSE) ]

uint16 Availability;

[SMS_Report (FALSE) ]

uint32 AveragePagesPerMinute;

[SMS_Report (FALSE) ]

uint16 Capabilities[];

[SMS_Report (FALSE) ]

string CapabilityDescriptions[];

[SMS_Report (FALSE) ]

string Caption;

[SMS_Report (FALSE) ]

uint32 ConfigManagerErrorCode;

[SMS_Report (FALSE) ]

boolean ConfigManagerUserConfig;

[SMS_Report (FALSE) ]

uint32 DefaultPriority;

[SMS_Report (FALSE) ]

string Description;

[SMS_Report (FALSE) ]

uint16 DetectedErrorState;

[SMS_Report (FALSE), key]

string DeviceID;

[SMS_Report (TRUE) ]

string DriverName;

[SMS_Report (FALSE) ]

boolean ErrorCleared;

[SMS_Report (FALSE) ]

string ErrorDescription;

[SMS_Report (FALSE) ]

uint32 HorizontalResolution;

[SMS_Report (FALSE) ]

datetime InstallDate;

[SMS_Report (FALSE) ]

uint32 JobCountSinceLastReset;

[SMS_Report (FALSE) ]

uint16 LanguagesSupported[];

[SMS_Report (FALSE) ]

uint32 LastErrorCode;

[SMS_Report (TRUE) ]

string Location;

[SMS_Report (TRUE) ]

string Name;

[SMS_Report (FALSE) ]

uint16 PaperSizesSupported[];

[SMS_Report (FALSE) ]

string PNPDeviceID;

[SMS_Report (TRUE) ]

string PortName;

[SMS_Report (FALSE) ]

uint16 PowerManagementCapabilities[];

[SMS_Report (FALSE) ]

boolean PowerManagementSupported;

[SMS_Report (FALSE) ]

string PrinterPaperNames[];

[SMS_Report (FALSE) ]

uint32 PrinterState;

[SMS_Report (FALSE) ]

uint16 PrinterStatus;

[SMS_Report (FALSE) ]

string PrintJobDataType;

[SMS_Report (TRUE) ]

string PrintProcessor;

[SMS_Report (FALSE) ]

string SeparatorFile;

[SMS_Report (TRUE) ]

string ServerName;

[SMS_Report (TRUE) ]

string ShareName;

[SMS_Report (FALSE) ]

boolean SpoolEnabled;

[SMS_Report (FALSE) ]

datetime StartTime;

[SMS_Report (FALSE) ]

string Status;

[SMS_Report (FALSE) ]

uint16 StatusInfo;

[SMS_Report (FALSE) ]

string SystemName;

[SMS_Report (FALSE) ]

datetime TimeOfLastReset;

[SMS_Report (FALSE) ]

datetime UntilTime;

[SMS_Report (FALSE) ]

uint32 VerticalResolution;

};

 

Save the file.

You will be unable to report on the new fields util clients get the new policy and start sending up data, to speed things up you can one one of the Clients that has the agent installed go into Control Pannel => Configuration Manager =>Actions Tab => Select  Machine Policy Retrieve => Initiate Action

Step 2: Creating the Report

Within the SCCM console Site Database => Computer Management => Reporting

Right-client Reports => New Report

Give it a name and select a category

Select Edit SQL Statement

My SQL statement is as below

However some people have reported problem with this SQL and instead have found the below works better