This repository is used to deploy printer drivers and shared printers via Microsoft Intune.
driver/– Place all printer driver files here, including the.infand all related.dll/.cat/.cabfiles. This folder also contains thedriverinstall.ps1script used to install the driver.printer/– Contains scripts to add printers using either IP-based setup or shared print server connections.
Place your extracted printer driver package (including .inf, .cat, .dll, etc.) inside the driver/ folder.
Example contents:
driver/
├── driverinstall.ps1
├── KOAWQJA.inf
├── KOAWQJA.cat
├── koawqja.dll
└── ...
- Use the Microsoft Win32 Content Prep Tool to package the
driver/folder into a.intunewinfile. - In the Intune portal:
- Upload the
.intunewinfile. - Install command:
C:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File .\driverinstall.ps1
- Define detection logic as needed.
- Upload the
When configuring the detection rule in Intune, you can use one or more of the following:
-
Shared printers (\server\printer):
Check if the printer exists in the registry at:
HKEY_CURRENT_USER\Printers\Connections\,,server.domain.local,Printer 1 -
IP-based printers:
Check if the printer exists in the registry at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\Printer 1 -
Driver presence:
Look for a folder named after the.inffile in:
C:\Windows\System32\DriverStore\FileRepositoryThe folder name is based on the driver's
.inffile and includes architecture/hash values
(e.g.koawqja.inf_amd64_0c123456abcdef01).To determine the correct folder name:
- Install the driver manually on a test machine or VM.
- Navigate to
C:\Windows\System32\DriverStore\FileRepository - Sort by Date modified to find the most recently created folder.
- Use the exact folder name for detection in Intune.
To deploy shared or IP-based printers, see the scripts in the printer/ folder. These can be packaged and assigned separately in Intune.
driverinstall.ps1– Installs a specific printer driver usingpnputilandAdd-PrinterDriver.deployprinterIP.ps1– Adds printers using IP and port.deployprinterShared.ps1– Adds printers using a shared UNC path (e.g.,\\server\printer).
MIT License