If you are using a print server and you would like to deploy network printers to endpoints you can follow the steps below.
- Gather your printer drivers
Download your specific printer drivers. And save them to a folder.
In my example I use a Konica printer driver. - Create a install script
Start-Transcript -Path "C:\temp\PrintDriverKyocera.log" If ($ENV:PROCESSOR_ARCHITEW6432 -eq "AMD64") { Try { &"$ENV:WINDIR\SysNative\WindowsPowershell\v1.0\PowerShell.exe" -File $PSCOMMANDPATH } Catch { Throw "Failed to start $PSCOMMANDPATH" } Exit } C:\Windows\System32\pnputil.exe /add-driver "$psscriptroot\Konica\KOAYSJ__.INF" /install Add-PrinterDriver -Name "KONICA MINOLTA C754SeriesPCL" Stop-Transcript
Modify the INF file and printerdriver name to match your printer. To get the driver name use get-printerdriver on a system where the printer already is installed or check the content of the INF file.
- Create Uninstall script
Remove-PrinterDriver -Name "KONICA MINOLTA C754SeriesPCL"
- Create detection script
if (Get-PrinterDriver -Name "KONICA MINOLTA C754SeriesPCL") { Write-host "Installed!"}
- Create intunewin file
You now have the following content in a folder- Folder with driver
- 2 or 3 PS scripts (Install, Uninstall and detection) Detection script is not necessary but I like to keep things together.
- Wrap this to an intunewin file with IntuneWinAppUtil.exe
- Create application in Microsoft Intune
- Create a new Win32 App
- Specify App information
- Specify install commands
Install:
powershell.exe -executionpolicy bypass -windowstyle hidden -file InstallScriptName.ps1
Uninstall:
powershell.exe -executionpolicy bypass -windowstyle hidden -file UninstallScriptName.ps1
- Detection rules
Use the detection script as detection rule. Select Use a custom detection script and upload the created detection script.
- Finish of the application creation process and assign it to devices or users.
- Create a new Win32 App