question

Raydar-0970 avatar image
0 Votes"
Raydar-0970 asked Amandayou-MSFT answered

Does SCCM collect printer port IP address?

I have a report of locally installed printers with computer name, printer name, and it only had printer port name, not the IP address. The report is using v_GS_PRINTER_DEVICE and it doesn't have the port IP address. Does SCCM collect printer port IP address and if so where is it?

SELECT SYS.Netbios_Name0 AS [Computer Name], printer.DriverName0 AS [Printer Driver], printer.PortName0 AS [Port Name], printer.Name0 AS[Printer Name], printer.IP AS [Printer IP]
FROM v_GS_PRINTER_DEVICE AS printer INNER JOIN
v_R_System AS SYS ON SYS.ResourceID = printer.ResourceID
join v_FullCollectionMembership fcm on fcm.resourceid=SYS.resourceid
WHERE (NOT (printer.DriverName0 LIKE 'Microsoft XPS%')) AND
(NOT (printer.DriverName0 LIKE 'Adobe PDF Converter')) AND
(NOT (printer.DriverName0 LIKE 'Microsoft Shared Fax Driver')) AND
(NOT (printer.DriverName0 LIKE '%TP Output Gateway%')) AND
(NOT (printer.DriverName0 LIKE '%pdf%')) AND
(NOT (printer.DriverName0 LIKE '%Remote Desktop%')) AND
(NOT (printer.DriverName0 LIKE '%OneNote%')) AND
(NOT (printer.DriverName0 LIKE 'Snagit%')) AND
(NOT (printer.DriverName0 LIKE 'Webex%')) AND
(NOT (printer.DriverName0 LIKE 'Amyuni%')) AND
(NOT (printer.DriverName0 LIKE 'Generic / Text Only%')) AND
(NOT (printer.DriverName0 LIKE 'Dell%')) AND
(NOT (printer.DriverName0 LIKE 'Ricoh%')) AND
fcm.Collectionid= @Collection
ORDER BY [Computer Name]

P.S. I can't find a relatable tag down there so just chose Win 10

mem-cm-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Raydar-0970 avatar image
0 Votes"
Raydar-0970 answered

OK so this is how I did it. Added Win32_TcpIpPrinterPort to the default client setting. And then modified the report to include HostAddress as the port IP address.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered Raydar-0970 commented

Hello @Raydar-0970

I know that you can achieve this through starting "Windows Diagnostics" and expand the "Components" then "Printing" on individual PC's, but this only will work when the PC is switched on.

But I understand that you are looking if you could somehow run a report from the SCCM database to give you the name and IP address of those printers. Yes, you can enable the win32_printer class in sms_def.mof. What this gets you is locally installed printers. This would be a printer connected to lpt1, usb, or if a local LPR port had been created. If you've never edited the mof before, on your primary site(s), in \inboxes\clifiles.src\hinv, open up the sms_def.mof file using notepad. Search for win32_printer. In that section, change FALSE to TRUE for the section, and then for oh.. probably these individual attributes: DriverName, Name, PortName. You could set to TRUE more options, but that's enough to start.


--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Garth avatar image
0 Votes"
Garth answered

first off remember that printers are a user setting not a system setting. therefore you will only see printer for the computer not the user.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Amandayou-MSFT avatar image
0 Votes"
Amandayou-MSFT answered

Hi,

Haven't heard from you for some time, are LimitlessTechnology and Garth's answers helpful to you? If it is helpful, please accept answer. It will make someone who has the similar issue easily find the answer.

If you have any other issues, please don't hesitate to let us know.

Thanks and have a nice day.



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.