PowerShell Endpoint Management

TLDR
  • 100+ club locations, each with multiple printers that needed to be set up silently on every new or reimaged workstation.
  • Built per-club scripts (one per location) and per-model scripts for common printer models.
  • Also includes network reset utilities, Windows Update checks, and a barcode scanner reboot tool for club front desks.
  • Everything designed to run silently via RMM or GPO.
100+
Locations
20+
Club scripts
14
Printer models
Silent
Deployment

The printer problem

Printers are the bane of every sysadmin's existence, and it gets worse when you have 100+ locations. Every club had between two and six printers: front desk, back office, receipt printers, sometimes a kiosk printer. And every time a workstation got reimaged or replaced, someone had to manually add all the printers back. At scale, that ate up a surprising amount of helpdesk time.

So I built a library of printer deployment scripts. The idea was simple: one script per club, one script per printer model, and everything runs silently without user interaction.

Per-club scripts

Each club gets its own numbered script. Club 623 gets 623.ps1, club 601 gets 601.ps1, and so on. Each script knows exactly which printers are at that location, their IP addresses, which driver to use, and what to name them. When a workstation at club 623 needs its printers set up, you run 623.ps1 and it handles everything.

# Add a TCP/IP printer port and install the printer
Add-PrinterPort -Name "IP_10.623.1.10" -PrinterHostAddress "10.623.1.10"
Add-Printer -Name "623-FD-HP LaserJet Pro 4001n" `
    -DriverName "HP LaserJet Pro 4001 PCL-6 (V4)" `
    -PortName "IP_10.623.1.10"

This approach has a downside: every time a club changes a printer, I have to update their script. But the upside is reliability. There's no dynamic discovery that might pick up the wrong device on the network, no configuration that depends on DHCP reservations being correct. Each script is a known-good state for that location.

Per-model scripts

Alongside the club scripts, I built model-specific scripts for the common printer models we deployed. HP LaserJet Pro 4001n, Canon imageRUNNER 1435i, HP PageWide, receipt printers. These handle the driver installation and basic port setup, but you pass in the IP address. They're useful for one-off installs or when setting up a printer model that multiple clubs share.

The receipt printer problem

Receipt printers were their own category of headache. They use different drivers than regular printers, the connection method varies (USB vs network), and they're picky about driver versions. I ended up with two versions of the receipt printer script because the first one didn't handle the USB-connected units properly. Version 2 detects the connection type and adjusts accordingly.

Barcode scanners

The scanner troubleshooting script is for the barcode scanners at club front desks. These scanners would periodically stop responding. The fix was usually to reset the USB connection and restart the scanner service, but explaining that process to every front desk employee wasn't working. The script does the reboot and reset automatically and logs whether it was successful.

Network basics

The network folder has a few general-purpose utilities. A batch file for resetting the network stack (DNS flush, Winsock reset, the usual), a printer discovery script for finding devices on the local subnet, and a Windows Update checker. Nothing fancy, but these came up often enough that having them ready to push through our RMM tool saved time.

The whole collection grew organically over a couple of years. Every time a new club opened or a new printer model showed up, another script got added. It's not elegant, but it works, and it turned printer setup from a 20-minute phone call into a 30-second script execution.


View the scripts on GitHub

Per-club printer scripts, model scripts, network utilities, and scanner tools.

View on GitHub