If you are using a print server and you would like to deploy network printers to endpoints you can follow the steps below.

  1. Gather your printer drivers
    Download your specific printer drivers. And save them to a folder.
    In my example I use a Konica printer driver.

  2. 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.

  3. Create Uninstall script
    Remove-PrinterDriver -Name "KONICA MINOLTA C754SeriesPCL"

     

  4. Create detection script
    if (Get-PrinterDriver -Name "KONICA MINOLTA C754SeriesPCL") { Write-host "Installed!"}

     

  5. 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
  6. Create application in Microsoft Intune
    1. Create a new Win32 App
    2. Specify App information
    3. Specify install commands
      Install:
      powershell.exe -executionpolicy bypass -windowstyle hidden -file InstallScriptName.ps1
      Uninstall:
      powershell.exe -executionpolicy bypass -windowstyle hidden -file UninstallScriptName.ps1
    4. Detection rules
      Use the detection script as detection rule. Select Use a custom detection script and upload the created detection script.
    5. Finish of the application creation process and assign it to devices or users.