Follow the steps below to deploy a local (network) printer with Intune. If you want to deploy a network printer and drivers follow the steps in this link.
-
- Gather your printer drivers
Download your specific printer drivers. And save them to a folder. In my example a Ricoh Universal Print driver. I created a Folder Printer Drivers with a subfolder Ricoh Universal Print v4.30 and with the drivers files.
- Gather your printer drivers
- Create Powershell script for installing the printer
#Copy PrinterDrivers to Device xcopy /Y ".\PrinterDrivers\Ricoh Universal Print v4.30\*.*" "C:\PrinterDrivers\Ricoh Universal Print v4.30\*.*" #Install Ricoh Universal Print driver v4.30 cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "RICOH PCL6 UniversalDriver V4.30" -i "C:\PrinterDrivers\Ricoh Universal Print v4.30\oemsetup.inf" #Install Printerport with check if the port already exist $portName = "IP_192.168.100.1" $checkPortExists = Get-Printerport -Name $portname -ErrorAction SilentlyContinue if (-not $checkPortExists) { Add-PrinterPort -name $portName -PrinterHostAddress "192.168.100.1" } #Install Printer Add-Printer -Name "PrinterName" -DriverName "RICOH PCL6 UniversalDriver V4.30" -PortName $portName
- Create Powershell script for uninstalling the printer#Uninstall Printer
#Remove Printer Remove-Printer -Name "PrinterName" #Uninstall Printerport with check if the port already exist $portName = "IP_192.168.100.1" $checkPortExists = Get-Printerport -Name $portname -ErrorAction SilentlyContinue if (-not $checkPortExists) { Remove-PrinterPort -name $portName -PrinterHostAddress "192.168.100.1" } #Remove PrinterDrivers Remove-Item -Recurse -Force C:\PrinterDrivers
- Create Powershell detection script
get-printer -name "PrinterName"
- Convert PS script to exe
I prefer to convert the powershell to an executable. You can Use PS2EXE-GUI for this created by Markus Scholtes. https://github.com/MScholtes/TechNet-GalleryEventually you will have a folder with the PS1 scripts, Exe, Printerdrivers and optionally a icon file.
- Create Win32 Application package. Create a Win32 Application package with the exe files and the printerdrivers.
- Deploy Windows32 Package
Set the install and uninstall commands to the exe files you have created earlier. Select the PS scipt for detecting the printer.
Assign the application to the required users and you are good to go