Does SCCM collect printer port IP address?

Raydar 96 Reputation points
2021-10-01T03:08:04.18+00:00

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

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. Raydar 96 Reputation points
    2021-10-02T22:19:31.93+00:00

    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.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Limitless Technology 39,391 Reputation points
    2021-10-01T12:59:06.197+00:00

    Hello @Raydar

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

    0 comments No comments

  2. Garth 5,801 Reputation points
    2021-10-03T12:11:35.337+00:00

    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.

    0 comments No comments

  3. Amandayou-MSFT 11,046 Reputation points
    2021-10-08T08:52:45.067+00:00

    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.

    0 comments No comments