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
Answers (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 4 years ago
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 4 years ago