Close Menu
    Facebook X (Twitter) Instagram
    Sunday, October 12
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»SCCM 2007»SCCM report Computers with the attached printers in the organisation

    SCCM report Computers with the attached printers in the organisation

    Eswar KonetiBy Eswar KonetiMarch 11, 12:52 pm1 Min Read SCCM 2007 6,982 Views
    Share
    Facebook Twitter LinkedIn Reddit

    You might get a request to find out all the computers in organisation connected to which printers.There might be differetn printers in organisation and connection to the computers will vary.I just thought to post this qeury on the which will be useful for some one.

    SELECT A.Name0, A.UserName0, B.Name0, B.DriverName0, B.Location0, B.PortName0, B.ShareName0

    FROM v_GS_COMPUTER_SYSTEM A, v_GS_PRINTER_DEVICE B
    WHERE A.ResourceID = B.ResourceID
    AND B.Name0 != 'Microsoft Office Document Image Writer'
    AND B.Name0 != 'Adobe PDF'
    AND B.Name0 != 'Microsoft XPS Document Writer'
    AND B.Name0 != 'PDF-XChange 3.0'
    AND B.DriverName0 != 'Microsoft Shared Fax Driver'
    AND B.DriverName0 != 'pdfFactory 2'
    AND B.DriverName0 != 'CutePDF Writer'
    ORDER BY A.Name0

    If you have any other printers whcih should be not be displayed in the report let say ,some users installed Bullzip PDF Printer You can simply add AND b.Drivername0!='Printer name'.

    Configmgr 2007 configmgr report Printers attached printers report SCCM SCCM 2007 sccm report for printers SCCM Reports SMS SQL
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    14 Comments

    1. Raffa Mukoon on August 8, 2018 7:57 PM

      Hello all,

      Try this in your WQL query

      select SMS_R_System.NetbiosName, SMS_G_System_PRINTER_DEVICE.Name, SMS_G_System_PRINTER_DEVICE.DeviceID, SMS_G_System_PRINTER_DEVICE.DriverName, SMS_G_System_PRINTER_DEVICE.PortName from SMS_R_System inner join SMS_G_System_PRINTER_DEVICE on SMS_G_System_PRINTER_DEVICE.ResourceID = SMS_R_System.ResourceId order by SMS_R_System.NetbiosName, SMS_G_System_PRINTER_DEVICE.Name

      Reply
    2. ThyFere on March 30, 2015 3:54 PM

      Hi,

      I ran this query successfully, thanks for it. But it is showing the old printers too which has made the list useless for me because I am not sure whether it's a current printer or user has removed it now.

      Is there any way to check if that printer is currently connected to the computer?

      Reply
      • Eswar Koneti on March 31, 2015 7:29 AM

        During the inventory ,printers should get updated and same will be available in CM DB.You can pick one client and see if the printers that are removed on the PC is still available in CM or not.

        Reply
    3. Ruud on August 13, 2014 6:54 PM

      Copying your text removes some spaces, this one works
      Also, to get a list of all printer devices in the database execute:
      SELECT * FROM v_GS_PRINTER_DEVICE

      =================================================================================
      SELECT A.Name0, A.UserName0, B.Name0, B.DriverName0, B.Location0, B.PortName0, B.ShareName0

      FROM v_GS_COMPUTER_SYSTEM A, v_GS_PRINTER_DEVICE B
      WHERE
      A.ResourceID = B.ResourceID
      AND B.Name0 != 'Microsoft Office Document Image Writer'
      AND B.Name0 != 'Adobe PDF'
      AND B.Name0 != 'Microsoft XPS Document Writer'
      AND B.Name0 != 'PDF-XChange 3.0'
      AND B.DriverName0 != 'Microsoft Shared Fax Driver'
      AND B.DriverName0 != 'pdfFactory 2'
      AND B.DriverName0 != 'CutePDF Writer'
      ORDER BY A.Name0

      Reply
      • Eswar Koneti on August 13, 2014 8:45 PM

        yep,I have used the same V_GS_Printer_device to get list of printers attached to each computer.

        Reply
    4. Chris on August 12, 2014 2:57 PM

      An item with the same key has already been added. is the Error I get when attempting to create the query.

      Reply
    5. Chris on August 12, 2014 2:47 PM

      Hi whenever i try to run this report in SCCM 2012 i get an error along the lines of cannot have the same key. If i Remove B.Name0 it works if I just use B.DriverName0 maybe some sort of conflict with A.Name0 ?

      Reply
      • Eswar Koneti on August 13, 2014 7:22 AM

        A.Name0 is computer name from v_gs_computername view. I just ran the query in SQL Studio,i dont see any issues.all works good.

        Reply
    6. online payment africa on September 14, 2012 1:05 PM

      i think there should be more in pc printers

      Reply
      • Eswar Koneti on September 14, 2012 4:37 PM

        the report basically list down printers what are they attached to system with the exclusion of software printer as given in report like image writer,pdf etc.
        you can more other printers as well which u dont want to see them by default!

        Reply
    7. Xerox laser toner on September 14, 2012 1:03 PM

      good post but i have not any other models which should be not be shown in the report

      Reply
    8. Ameen on August 23, 2011 4:56 PM

      Hi Eswar,
      Nice post but unfortunately this query does not run in my SQL management studio.

      Am I missing any thing...?

      Many thanks,
      Ameen.

      Reply
      • Eswar Koneti on August 24, 2011 5:13 PM

        what is the error message do you get when you run this ?
        did you selected the correct database not master? should be like SMS_sitecode ?

        Reply
    9. Pingback: Computer e stampanti collegate « Mattioli Roberto's Blog

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.