Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tylerapplebaum
Last active February 1, 2019 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerapplebaum/0a82343a53c34b6f0d27724154fbfabe to your computer and use it in GitHub Desktop.
Save tylerapplebaum/0a82343a53c34b6f0d27724154fbfabe to your computer and use it in GitHub Desktop.
Printer Automation Idea for Dave
[CmdletBinding()]
param(
[Parameter(HelpMessage="Specify the path to the CSV file")]
[string]$CSVPath,
[Parameter(HelpMessage="Specify one of OCHIN's supported drivers")]
[ValidateSet("HP LaserJet 4100 Series PCL6", "HP Universal Printing PCL 5 (v5.7.0)", "Kyocera TASKalfa 7551ci", "Sharp MX-3500N", "Xerox Global Print Driver PCL")]$Driver
)
ForEach ($Printer in $Printers) {
C:\Printer_Build\Remote.ps1 -PrinterName $Printer.EPIC_ID -PrintServerName $Printer.Print_Server -QueueName $Printer.Printer_Name -DriverName $Driver -Tray $Printer.Tray_Number -Comment $Printer.Comment -Location $Printer.Location
}
##########
EPIC_ID,Print_Server,Printer_Name,Tray_Number,Comment,Location
2010049,mchdps,mchdmcyphmphlox t1,T1,mchdps,McCoy Building Pharmacy - 170
2010050,mchdps,mchdmcyphmphlox t2,T2,mchdps,McCoy Building Pharmacy - 170
##########
[CmdletBinding()]
param(
[Parameter(HelpMessage="Specify the path to the CSV file")]
[string]$CSVPath,
[Parameter(HelpMessage="Specify one of OCHIN's supported drivers")]
[ValidateSet("HP LaserJet 4100 Series PCL6", "HP Universal Printing PCL 5 (v5.7.0)", "Kyocera TASKalfa 7551ci", "Sharp MX-3500N", "Xerox Global Print Driver PCL")]$Driver
)
Function Tester {
ForEach ($Printer in $Printers) {
Write-Output $Printer.EPIC_ID
Write-Output $Printer.Print_Server
Write-Output $Printer.Printer_Name
Write-Output $Printer.Tray_Number
Write-Output $Printer.Comment
Write-Output $Printer.Location
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment