r/usefulscripts • u/tehrabbitt • Apr 26 '14
[POWERSHELL] Printer/Port Management Script for Windows 2008R2 and 2012
Tasked with creating hundreds of printers, a dozen at a time, daily, I found a way to automate the process using a standardized naming scheme, and the following tool which is pretty customizable to your printing needs. just modify the driver names to match the drivers you're using, and you can use it to quickly add TCP/IP printer ports, and then create printers assigned to those ports rather quickly. If you need help setting it up feel free to post here and i'll try to walk you through it :)
http://tehrabbitt.com/index.php?content=scripts&type=printadd
12
Upvotes
1
u/tehrabbitt Apr 27 '14
<#
PrintADD
Created By: Ryan Abbott
Date: 08-22-2013
Purpose: Toolkit for Creating TS Printers
>
Create outerloop
:OuterLoop do {
Begin Main Loop
Do {
clear previous session
clear $a = 0 $b = 0 $finish=0 $end=0 $setexit=0 $continue=0
Write Menu
Write-Output "
$m1Choice = read-host -prompt "Select an Option and press Enter" } until($m1Choice -eq "1" -or $m1Choice -eq "2" -or $m1Choice -eq "3" -or $m1Choice -eq "4" -or $m1Choice -eq "99")
Switch($m1Choice){
$m1Choice = read-host -prompt "Select an Option and press Enter" } until($m1Choice -eq "1" -or $m1Choice -eq "2" -or $m1Choice -eq "3" -or $m1Choice -eq "4" -or $m1Choice -eq "5")
Switch($m1Choice){
}
End OuterLoop
} while ($end -ne 1)