Good afternoon, I have in my environment a print server with a total of 63 printers installed and shared on the network, I would like a script to automate the installation of these printers on the machines of the company, so far I have done the script below in .bat, but it is only installing 1 printer, unless I repeat the code block 63 times to do with each one I wanted a way to automate it to install all printers on the print server (checking if they are installed before installing to not install more than 1 time) but I could not think of a syntax and I do not want to have to repeat this block of code 63 times
SET IMPRESSORA=\HOSTNAME_SERVIDOR\COLOR
wmic printer get name /value | findstr /I /E "%IMPRESSORA%"
IF NOT %ERRORLEVEL% == 0 Rundll32 printui.dll,PrintUIEntry /in /n %IMPRESSORA%