/build/static/layout/Breadcrumb_cap_w.png

how to get printers list

Hello guys and gals. 

I am trying to show printers list on a computer.

I am able to accomplish the action with a custom inventory rule and I added below;

ShellCommandTextReturn(powershell Get-WMIObject Win32_Printer -recurse  | Select-Object systemname, Name, PortName, drivername )

above works and shows the list of printers. 

the problem is it trims the output and looks like below


systemname Name PortName drivername
---------- ---- -------- ----------
16V27V1 Send To OneNote 2010 nul: Send To Mi...
16V27V1 ricoh 7502 10.2.90.244 Gestetner ...
16V27V1 PDFCreator pdfcmon PDFCreator
16V27V1 Microsoft XPS Document Writer XPSPort: Microsoft ...
16V27V1 Fax SHRFAX: Microsoft ...
16V27V1 CAD Zone PDF CPWPT001: CUSTPDF Wr...
16V27V1 Academy - room 222 - HP LaserJet 4250 PCL6 10.2.90.233 HP LaserJe..


How do I get the values show full length?


thanks in advance.


It seems, windows 10 pro showing the values in full length but not on windows 7. I still have the same problem and need help


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: mtatro 6 months ago
Yellow Belt
2

Top Answer

Try piping"| Format-Table -AutoSize" to the command. If that does not work, maybe "| Format-Table -Wrap".


Comments:
  • Thank you mtatro. this was awesome. - jencam 6 months ago
Posted by: anonymous_9363 6 months ago
Red Belt
0

Your subject line should read "Powershell script truncates printer list under Windows 7"

Also...Windows SEVEN?!? In 2020?!? W.O.W.


Comments:
  • vbscab,

    Yes I know about windows 7. we still have about 400 pcs with it. and we are slowly upgrading them to win10.

    thank you for your comment. - jencam 6 months ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ