Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124


Welcome to this technical guide entitled “Automate Network Printers installation through PowerShell”. This guide is intended for anyone looking to simplify and automate the installation of network printers in a corporate environment. PowerShell, a powerful scripting language developed by Microsoft, offers an efficient solution for automating these repetitive and time-consuming tasks. In this guide, we’ll explore how to use PowerShell to automate the installation of network printers, which can greatly improve the efficiency and productivity of your IT team.
we can use the following script with :

If you have azure storage account ou can follow steps in this technical guide to upload PCL6 driver and generate https link on (II – Prepare Wallpapers section) :
Otherwise, you can store the driver in any other account storage and generate https link (you can use AWS, Google, dropbox, Onedrive…etc)
Before Executing the script, we must provide some details like :
Follow this setps to get this detail :
Download and extract the PCL6 zip file and copy inf file name to notepad to use it later in the following script (in my case KOAXGJ_.inf as you can see in the following screenshot).

Open the previous inf file with notepad (KOAXGJ_.inf) then copy the driver name from amd64 section : “KONICA MINOLTA C360iSeriesPCL” (C360i is compatible with C250i , I got this information from the provider)

We will use all this details in the following script.
Before executing the script, you should replace details in the first section (Variable to add here)
# ------------------------------------------------------------- Variable to add here ----------------------------------------------------------------------------
# https link to download printer driver
$Url = 'https_Link'
# Printer name that will displayed after printer installation
$Printer_Name = "Konica Printer (First floor)"
# Printer model
$PrinterModel = 'Konica_C250i'
# Inf file that contain all drivers
$inf_File = 'KOAXGJ__.inf'
# Printer IP address
$Printer1_IP = "172.16.10.200"
# Printer driver name : we can get this information directly from printer inf file
$Driver_Name = "KONICA MINOLTA C360iSeriesPCL"
# ------------------------------------------------------------- Download and extract file ----------------------------------------------------------------------------
# Create a temporary directory to store Driver
$TempDir = "C:\temp\"
if((Test-Path $TempDir) -eq $false)
{
New-Item -ItemType Directory -Path $TempDir -erroraction SilentlyContinue | Out-Null
}
$Download = $TempDir + $PrinterModel
# Download the Konica_C250i file
Invoke-WebRequest $Url -OutFile $Download
# Unzip downloaded file
Expand-Archive $Download -DestinationPath $TempDir
# ------------------------------------------------------------- Install printer ----------------------------------------------------------------------------
# Define portName from IP address
$Port1_Name = "IP1_" + $Printer1_IP
# Windows driver Repository
$Windows_Repository = "C:\Windows\System32\DriverStore\FileRepository\"
# Add driver to the driver store
& Pnputil /add-driver ($Download + '\' + $inf_File) /install
# Install the driver from windows driver store : C:\Windows\System32\DriverStore\FileRepository
$Driver_Folder = (Get-Item -Path ($Windows_Repository+'*') | Select Name | where Name -like 'KOAXGJ__.inf*').Name
Add-PrinterDriver -Name "KONICA MINOLTA C360iSeriesPCL" -InfPath ($Windows_Repository + $Driver_Folder + '\' + $inf_File )
# Creating printers ports
Add-PrinterPort -Name $Port1_Name -PrinterHostAddress $Printer1_IP
# Installing the first printer
Add-Printer -Name $Printer_Name -DriverName $Driver_Name -PortName $Port1_Name
here is the result of execution script :

In conclusion, automating network printer installation using PowerShell can transform the way your IT team manages printers in your organization. Not only does it save time and effort, it also reduces the potential for human error. We hope this guide has provided you with the knowledge and skills you need to start automating your network printer setup. Remember, practice makes perfect with PowerShell. So start scripting and automating today!
Thanks