This year I wrote two separate blog posts about adding printer drivers and printers to Intune clients. Recently I repackaged these two into one package with some improvements. In this blog post, I will show how it looks now 🙂
How the script works
The script will take the following steps:
- Import a printers.csv file containing all printers. This file looks like this: (The DriverName is present in the .inf files, make sure it matches)
"Name","DriverName","PortName","Comment","Location" "Contoso-General","TOSHIBA Universal Printer 2","192.1.2.3","Contoso","Hallway" "Contoso-HP","HP Universal Printing PCL 6 (v7.0.0)","192.4.5.6","HR","HR Office" "Contoso-MFP","Canon Generic Plus PCL6","192.7.8.9","MFP","Finance Office"
- Create a list of .inf files in the package directory, and you can add the driver directories in separate folders like this:
Canon HP Toshiba
- Install all the drivers from within those folders using the .inf files
- Add all the installed drivers to Windows using the Add-PrinterDriver cmdlet
- Add the printers using the fields from the CSV file to Windows using the Add-PrinterPort, Add-Printer, and Set-PrintConfiguration cmdlets. If it finds printer ports that were already present, it will remove the attached printer first and recreate it (Easy if you have an updated name or IP address for that port). You can edit the script to set the default Printer configuration. This example doesn’t print in color by default and prints on both sides of the paper.
The detection script for Intune will count the number of printers and check if they are all installed. If not, it will exit with code 1, which tells Intune to start the install.cmd.
Running the installation script
When running the Add_Printers.ps1 script, the output looks like this (It also logs all output to c:\windows\temp\printers.log using Start-Transcript)
Transcript started, output file is c:\windows\temp\printers.log [Install printer driver(s)] [1/3] Adding inf file C:\Users\WDAGUtilityAccount\Desktop\Adding Printer Drivers and Printers with Intune\Canon\CNP60MA64.INF [2/3] Adding inf file C:\Users\WDAGUtilityAccount\Desktop\Adding Printer Drivers and Printers with Intune\HP\hpcu250u.inf [3/3] Adding inf file C:\Users\WDAGUtilityAccount\Desktop\Adding Printer Drivers and Printers with Intune\TOSHIBA\esf6u.inf [Add printerdriver(s) to Windows] [1/3] Adding printerdriver TOSHIBA Universal Printer 2 [2/3] Adding printerdriver HP Universal Printing PCL 6 (v7.0.0) [3/3] Adding printerdriver Canon Generic Plus PCL6 [Add printer(s) to Windows] [1/3] Adding printer Contoso-General [2/3] Adding printer Contoso-HP [3/3] Adding printer Contoso-MFP Transcript stopped, output file is C:\windows\temp\printers.log
Running the detection script
Intune will run the detection script to see if all printers are installed. You can see the output in the AgentExector.log file in C:\ProgramData\Microsoft\IntuneManagementExtension\Logs :
Name ComputerName Type DriverName PortName Shared Published ---- ------------ ---- ---------- -------- ------ -------- Contoso-General Local TOSHIBA Universal Pri... Contoso-Gene... False False Contoso-HP Local HP Universal Printing... Contoso-HP False False Contoso-MFP Local Canon Generic Plus PC... Contoso-MFP False False (3) printers were found
If it can’t find all printers, it will remove/add everything with the values from the printers.csv list. By doing so, any change in the detection.ps1 script will start the installation so that changes in the printers.csv will be processed, making updating existing printers easier. Constantly update the detection.ps1 with the correct printer names!
The scripts
Below are all the files needed for installation. Combine these with the printer folders into one folder and create a .intunewin file. Add the package to intune and use the detection.ps1 for the detection rule and the install.cmd and uninstall.cmd for install/uninstall and set it as System.
Add_Printers.ps1
Start-Transcript -Path c:\windows\temp\printers.log #Read printers.csv as input $Printers = Import-Csv .\printers.csv #Add all printer drivers by scanning for the .inf files and installing them using pnputil.exe $infs = get-childitem -Path . -Filter "*.inf" -Recurse -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Fullname $totalnumberofinfs = $infs.Count $currentnumber = 1 Write-Host ("[Install printer driver(s)]`n") -ForegroundColor Green Foreach ($inf in $infs) { Write-Host ("[{0}/{1}] Adding inf file {2}" -f $currentnumber, $totalnumberofinfs, $inf) -ForegroundColor Green try { c:\windows\sysnative\Pnputil.exe /a $inf | Out-Null } catch { try { c:\windows\system32\Pnputil.exe /a $inf | Out-Null } catch { C:\Windows\SysWOW64\pnputil.exe /a $inf | Out-Null } } $currentnumber++ } #Add all installed drivers to Windows using the CSV list for the correct names $totalnumberofdrivers = ($printers.drivername | Select-Object -Unique).count $currentnumber = 1 Write-Host ("`n[Add printerdriver(s) to Windows]") -ForegroundColor Green foreach ($driver in $printers.drivername | Select-Object -Unique) { Write-Host ("[{0}/{1}] Adding printerdriver {2}" -f $currentnumber, $totalnumberofdrivers, $driver) -ForegroundColor Green Add-PrinterDriver -Name $driver $currentnumber++ } #Loop through all printers in the csv-file and add the Printer port, the printer and associate it with the port and set the color options to 0 which is black and white (1 = automatic and 2 = color) $totalnumberofprinters = $Printers.Count $currentnumber = 1 Write-Host ("`n[Add printer(s) to Windows]") -ForegroundColor Green foreach ($printer in $printers) { Write-Host ("[{0}/{1}] Adding printer {2}" -f $currentnumber, $totalnumberofprinters, $printer.Name) -ForegroundColor Green #Set options for adding printers and their ports $PrinterAddOptions = @{ ComputerName = $env:COMPUTERNAME Comment = $Printer.Comment DriverName = $Printer.DriverName Location = $Printer.Location Name = $Printer.Name PortName = $Printer.Name } $PrinterConfigOptions = @{ Color = 0 DuplexingMode = 'TwoSidedLongEdge' PrinterName = $Printer.Name } $PrinterPortOptions = @{ ComputerName = $env:COMPUTERNAME Name = $Printer.Name PrinterHostAddress = $Printer.PortName PortNumber = '9100' } #Add Printerport, remove existing one and the corresponding printer if it already exists if (Get-PrinterPort -ComputerName $env:COMPUTERNAME | Where-Object Name -EQ $printer.Name) { Write-Warning ("Port for Printer {0} already exists, removing existing port and printer first" -f $printer.Name) Remove-Printer -Name $printer.Name -ComputerName $env:COMPUTERNAME -Confirm:$false -ErrorAction SilentlyContinue Start-Sleep -Seconds 10 Remove-PrinterPort -Name $printer.Name -ComputerName $env:COMPUTERNAME -Confirm:$false } #Add printer and configure it with the required options Add-PrinterPort @PrinterPortOptions Add-Printer @PrinterAddOptions -ErrorAction SilentlyContinue Set-PrintConfiguration @PrinterConfigOptions $currentnumber++ } Stop-Transcript
Detection.ps1
$printers = @( 'Contoso-General' 'Contoso-HP' 'Contoso-MFP' ) #Check every printer if it's installed $numberofprintersfound = 0 foreach ($printer in $printers) { try { Get-Printer -Name $printer -ErrorAction Stop $numberofprintersfound++ } catch { "Printer $($printer) not found" } } #If all printers are installed, exit 0 if ($numberofprintersfound -eq $printers.count) { write-host "($numberofprintersfound) printers were found" exit 0 } else { write-host "Not all $($printers.count) printers were found" exit 1 }
Install.cmd
powershell.exe -executionpolicy bypass -file .\add_printers.ps1
Printers.csv
"Name","DriverName","PortName","Comment","Location" "Contoso-General","TOSHIBA Universal Printer 2","192.1.2.3","Contoso","Hallway" "Contoso-HP","HP Universal Printing PCL 6 (v7.0.0)","192.4.5.6","HR","HR Office" "Contoso-MFP","Canon Generic Plus PCL6","192.7.8.9","MFP","Finance Office"
Remove_Printers.ps1
#Read printers.csv as input $Printers = Import-Csv .\printers.csv #Loop through all printers in the csv-file and remove the printers listed foreach ($printer in $printers) { #Set options $PrinterRemoveOptions = @{ Confirm = $false Name = $Printer.Name } $PrinterPortRemoveOptions = @{ Confirm = $false Computername = $env:COMPUTERNAME Name = $Printer.Name } #Remove printers and their ports Remove-Printer @PrinterRemoveOptions Start-Sleep -Seconds 10 Remove-PrinterPort @PrinterPortRemoveOptions } #Remove drivers from the system foreach ($driver in $printers.drivername | Select-Object -Unique) { $PrinterDriverRemoveOptions = @{ Confirm = $false Computername = $env:COMPUTERNAME Name = $driver RemoveFromDriverStore = $true } Remove-PrinterDriver @PrinterDriverRemoveOptions }
Uninstall.cmd
powershell.exe -executionpolicy bypass -file .\remove_printers.ps1
Download the script(s) from GitHub here
Adding the package to Intune
Create a .intunewin package
Below are the steps for creating a .intunewin package which you can add to Intune:
- Create a folder, for example, C:\Temp\Printers, and copy all the above scripts and the driver directories needed. (Make sure to include all printer installation files, just the .inf file is not enough) In my case, the contents of C:\Temp\Printers look like this:
Canon HP TOSHIBA Add_Printers.ps1 Detection.ps1 install.cmd printers.csv Remove_Printers.ps1 uninstall.cmd
- Start intunewinapputil.exe (Download from here) and enter this
Please specify the source folder: C:\Temp\Printers C:\Temp\Printers Please specify the setup file: install.cmd Please specify the output folder: C:\Temp Do you want to specify catalog folder (Y/N)?N
- After pressing Enter, the intunewinapputil.exe will create an install.intunewin file in C:\Temp
INFO File 'C:\Temp\install.intunewin' has been generated successfully [=================================================] 100% INFO Done!!!
Note: You can also create the .intunewin package in a one-liner:
IntuneWinAppUtil -c C:\Temp\Printers -s install.cmd -o C:\Temp
Uploading the .intunewin package
Below are the steps needed to add the package to Intune:
- Go to Windows – Microsoft Endpoint Manager admin center
- Select Add, select Windows app (Win32) from the pulldown menu, and click Select.
- Click on Select app package file, click on the folder icon, select the C:\Temp\install.intunewin file, choose Open, and click on Ok.
- Enter “Printers” as Name, for example.
- Select Edit Description and change Description to “Install printer drivers and add printers,” for example, and click Ok.
- Enter “PowerShellisfun” as Publisher, for example 😉
- Enter “1.0” as App Version
- Select Next
- Enter “install.cmd” as Install command and “uninstall.cmd” as Uninstall command.
- Change Device restart behavior to No specific action
- Select Next
- Select 32-bit and 64-bit as Operating system architecture.
- Select Windows 10 20H1 as Minimum operating system (Or lower if needed)
- Select Next
- Select Use a custom detection script as Rules format
- Click on Select a file and select C:\Temp\Printers\Detection.ps1 and choose Open
- Select Next
- Select Next on the Dependencies screen.
- Select Next on the Supercedence (preview) screen.
- Select Add group in the Required or Available for enrolled Devices section, browse, and select the desired group.
- Select Next
- Select Create
Note: First, deploy it to a test group. Check the installation status in the App that was just created and in C:\Windows\Temp\Printers.log if needed.
Pingback: Blog post – Adding printer drivers and printers using Intune – 247 TECH
Pingback: Intune Newsletter - 9th December 2022 - Andrew Taylor
Harm, when making the package, which file do I specify as the setup file?
If you have all the .cmd and .ps1 files in the directory including the subfolders with the drivers, you can specify install.cmd as the setup file. When configuring the Win32 app in Intune, you can also specify that one as the install command
Harm, this is exactly what I’m looking for! However, i’m a complete novice :/ . How do I exact the correct info for printers.csv? thank you in advance!
The CSV is made from a few things:
“Name”,”DriverName”,”PortName”,”Comment”,”Location”
“Contoso-General”,”TOSHIBA Universal Printer 2″,”192.1.2.3″,”Contoso”,”Hallway”
The first part is the printer’s name, which is how the user will see it in Windows. The second part is the driver’s name. When you have the printer installed on a system, you will see this in your printer options. The third part is the address or fqdn name of the printer. The fourth part is the comment that the user can see and use to identify the printer, together with the fifth part, which tells them the location.
You have to fill these to your liking. It depends on what printers you want to install on the client.
powershell.exe : At C:\temp\test2\Scripts\add_printers.ps1:8 char:72
At line:1 char:1
+ powershell.exe -executionpolicy bypass -file add_printers.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (At C:\temp\test…s.ps1:8 char:72:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
… )]
n") -Foreg ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'n" class="EnlighterJSRAW">n"' in expression or statement.
At C:\temp\test2\Scripts\add_printers.ps1:8 char:72
... ("[Install printer driver(s)]<code data-enlighter-language="n" class ...
~
Missing closing ')' in expression.
At C:\temp\test2\Scripts\add_printers.ps1:8 char:100
... ]
n") -Foregr ...
~
Unexpected token ')' in expression or statement.
CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : UnexpectedToken
This is because ot the Enlighter code plugin 🙁 Copying it like this from the blog post doesn’t seem to work, it adds stuff to it 🙁 Best thing is to go to the Github page (Link below the post) and copy/paste/download it from there
It was a setting in the plugin, the developer of Enlighter pointed me that that. Thanks https://github.com/AndiDittrich !
Would you mind including some screenshots for how this was added as a Win32 app in Intune?
I added a step-by-step how-to to the blog post now 🙂
Hi there again, it’s also unclear how you generated the intunewin file. There’s not really an executable here, right? I tried using only the -c and -o switches but it still requires a -s to complete.
Correct, there’s no executable but you can point to the install.cmd file, I added the steps to the blog post just now 🙂
Is this supposed to work on AADJ Autopilot devices ?
Yes, the script adds drivers, printer ports and local printers to the device. Are you running into issues?
Hi Harm,
I’ve deployed the package on a group test. A small part of the computers have printers deployed properly. A lot of the computers have no printers deployed.
Also the install status is at Failed for all computers.
I’ve tried first to assign as Required then as Available for enrolled devices on the group test.
The result is the same.
Windows version on all PCs is higher than Windows 10 20H1, as setup in Intune.
Can you please advise on this ? Thanks !
Could you post the contents of the log file that is in c:\windows\temp? That should list the things of the installation process
The C:\windows\temp is empty.
What should be the name of the log file or folder ?
It’s the file which is in the first line of the Add_Printers.ps1 script, printers.log
Sorry I found it. The content is :
Début de la transcription Windows PowerShell
Heure de début : 20230309175524
Nom d’utilisateur : WORKGROUP\Système
Utilisateur runAs : WORKGROUP\Système
Nom de la configuration :
Ordinateur : LAPTOP-R8FLJPF1 (Microsoft Windows NT 10.0.19045.0)
Application hôte : powershell.exe -executionpolicy bypass -file .\add_printers.ps1
ID de processus : 21204
PSVersion: 5.1.19041.2364
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.2364
BuildVersion: 10.0.19041.2364
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
Transcription démarrée, le fichier de sortie est c:\windows\temp\printers.log
[Install printer driver(s)]
[1/1] Adding inf file C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\Canon\CNP60MA64.INF
[Add printerdriver(s) to Windows]
[1/1] Adding printerdriver Canon Generic Plus PCL6
Add-PrinterDriver : Le pilote spécifié n’existe pas dans le magasin de pilotes.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:33 : 5
+ Add-PrinterDriver -Name $driver
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver)
[Add-PrinterDriver], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070705,Add-PrinterDriver
Add-PrinterDriver : Le pilote spécifié n’existe pas dans le magasin de pilotes.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:33 : 5
+ Add-PrinterDriver -Name $driver
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver) [Add-PrinterDri
ver], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070705,Add-PrinterDriver
[Add printer(s) to Windows]
[1/3] Adding printer Printer R2 – Paris office
Set-PrintConfiguration : L’imprimante spécifiée est introuvable.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:78 : 5
+ Set-PrintConfiguration @PrinterConfigOptions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterConfiguration:ROOT/StandardCi…erConfiguration)
[Set-PrintConfiguration], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070709,Set-PrintConfiguration
Set-PrintConfiguration : L’imprimante spécifiée est introuvable.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:78 : 5
+ Set-PrintConfiguration @PrinterConfigOptions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterConfiguration:ROOT/StandardCi…erConfiguration) [Set-PrintCo
nfiguration], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070709,Set-PrintConfiguration
[2/3] Adding printer Printer R3 – Paris office
Set-PrintConfiguration : L’imprimante spécifiée est introuvable.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:78 : 5
+ Set-PrintConfiguration @PrinterConfigOptions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterConfiguration:ROOT/StandardCi…erConfiguration)
[Set-PrintConfiguration], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070709,Set-PrintConfiguration
Set-PrintConfiguration : L’imprimante spécifiée est introuvable.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:78 : 5
+ Set-PrintConfiguration @PrinterConfigOptions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterConfiguration:ROOT/StandardCi…erConfiguration) [Set-PrintCo
nfiguration], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070709,Set-PrintConfiguration
[3/3] Adding printer Printer R4 – Paris office
Set-PrintConfiguration : L’imprimante spécifiée est introuvable.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:78 : 5
+ Set-PrintConfiguration @PrinterConfigOptions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterConfiguration:ROOT/StandardCi…erConfiguration)
[Set-PrintConfiguration], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070709,Set-PrintConfiguration
Set-PrintConfiguration : L’imprimante spécifiée est introuvable.
Au caractère C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:78 : 5
+ Set-PrintConfiguration @PrinterConfigOptions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterConfiguration:ROOT/StandardCi…erConfiguration) [Set-PrintCo
nfiguration], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070709,Set-PrintConfiguration
Fin de la transcription Windows PowerShell
Heure de fin : 20230309175527
“1/1] Adding inf file C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\Canon\CNP60MA64. INF
[Add printerdriver(s) to Windows] [1/1]
Adding printerdriver Canon Generic Plus PCL6
Add-PrinterDriver: The specified driver does not exist in the driver store.
To the character C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:33 : 5 + Add-PrinterDriver -Name $driver + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: NotSpecified: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver)
[Add-PrinterDriver], CimException
Add-PrinterDriver: The specified driver does not exist in the driver store.
To the character C:\Windows\IMECache\e812789a-b68b-4f4a-b22b-a6fc2c21dd64_1\add_printers.ps1:33 : 5 + Add-PrinterDriver -Name $driver + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo: NotSpecified: (MSFT_PrinterDriver:ROOT/StandardCimv2/MSFT_PrinterDriver) [Add-PrinterDri
ver], CimException”
Are you sure that the driver name is correct? What is in the CNP60MA64. INF? Does it say ‘Canon Generic Plus PCL6’?
If you open Print Management, and open Custom Filters, All Drivers? Is that driver name there?
CNP60MA64.INF is the filename for the Canon Generic Plus PCL6 driver. Which name should I write in the printers.csv ?
I can’t find Print Management but I did a Get-PrinterDriver and the driver is not there.
Does the package install the driver ?
The Get-PrinterDriver cmdlet shows installed drivers, so it seems the driver is not installed. You should specify that name in the second column of the CSV like in the example in the post above. The package installs the all printerdrivers that it can find in the package, it scans the subdirectories for .inf files and installs those. Somehow the .inf file is installed (and the driver) if I check your log output. Seems like formatting is wrong in your CSV perhaps?
Could you share your files which you used to create the package with? You can email me on harm.veenstra@gmail.com with a download link
Thanks for emailing it, glad that I could help out with the driver installation!
Hi Harm … How can I pre-determine the name of the driver that is embedded in the .INF file? For example , the HP Universal Print Driver has 12 .inf files, which one is used to determine the eventual drive name stored in the driverstore
I usually download and extract a specific printer driver, then I start my Windows Sandbox (Or another VM or your computer), go to Settings, Bluetooth & Devices, Printers and Scanners, and Print Server properties. Go to the Drivers tab, choose Add and point to the extracted files. In the case of the HP Universal Printer driver, I just tested it, and it always shows two when selecting a .inf file: HP Universal Printing PCL6 and HP Universal Printing PCL6 (v7.0.1). I would go for the one with v7.0.1 in the description so that you know the version.
Most of the .inf files don’t have the Printer driver’s name. Some do but then for a specific (Non-Universal?) driver. The hpcu255u.inf file has the information and is the biggest .inf file, but I am unsure if that’s the reason 😉
The other two examples in my blog post, Toshiba and Canon don’t have that many .inf files… Just one 🙂 It’s an HP thing? Test functionality before choosing between the PCL6 and the PCL6 (v7.0.1). Not sure if there’s a difference between them…
This is an incredible post. Very well written and easy to follow. We have been looking for a printer deployment solution for our small clients using Intune without paying for PrinterLogic or something similar. Thanks for writing this!
One thing to add, if you get an error message when trying to install the printer driver (like ‘requested file not found’), it’s probably because the driverfile.inf file is looking for other files to complete the driver installation. Most of the time, just the inf file is not sufficient. For example, for our Ricoh copier, once I copied the entire contents that the big exe drive file extracts to the folder, the driver install completed without issue.
Thank you 😊 yes, it’s a simple solution to install printers that doesn’t require any additional subscriptions 😅
And yes, download and extract the complete driver package and pnputil will install all drivers in the package for you
Great Stuff, Really useful well crafted scripts. Now our T1 techs can build out Intune packages without many issues. Also Printers are evil so this really helps keep the gates of hell shut !
😁 True, true