• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

Print Management

One-Liner Wednesday November 16, 2022

November 16, 2022 by ClaytonT Leave a Comment

Always love when you get surprised by printer issues? Here is a one liner that in its current state works great, but can be expanded on to be even more powerful, or gives you an idea to go more in depth.

 invoke-command -computername ServerName -credential YourUser  -scriptblock {get-printer | select-object name, printerstatus, portname}

This code will connect to your print server or user computer and check all printers installed and their status. It’s not limited to one computer for situations where you have multiple printer servers or need to check on multiple user computers. It will even show when toner and paper jams. Wouldn’t it be nice to see if the user is even connected to the printer they are trying to print to or if the printer is saying there is a paper jam?

To go a step farther, you could set this up as a scheduled task or have it monitor, and send a toast notification, create a ticket depending on the error, or send a chat message to your teams/discord/slack channel. To go even more granular, you could connect to the printer’s API and check toner levels, and have it order that toner when it hits the pre-determined threshold.

Hoping this little one liner helps out, and gives you some more ideas on how you can expand on it, to make your lives easier. If you have a related script, please post it in the comments for more ideas.

PowerShell Help:
Get-Printer

Tagged With: One Liner Wednesday, PowerShell, Print Management

Primary Sidebar

Clayton Tyger

Tech enthusiast dad who has lost 100lbs and now sometimes has crazy running/biking ideas. Read More…

Find Me On

  • Email
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Recent Posts

  • One-Liner Wednesday January 25, 2023
  • Module Monday January 23, 2023
  • One-Liner Wednesday January 18, 2023
  • Module Monday January 16, 2023
  • Read-Only Friday January 13, 2023

Categories

  • 365
  • Active Directory
  • Cim
  • Dashboards
  • Documentation
  • Get-WMI
  • Learning
  • Module Monday
  • Nutanix
  • One Liner Wednesday
  • Passwords
  • PDF
  • PowerShell
  • Read-Only Friday
  • Reporting
  • Security
  • Windows
  • WSUS

© 2023 Clatent