Forum Discussion
Intune Install Printer Driver
I am trying to install a Printer driver via a Win32app using System to install.
Have set configuration as below:
Its a simple powershell script which runs perfectly when installing on a device as an administrator.
$printdriver = "PCL6 V4 Driver for Universal Print"
C:\Windows\system32\pnputil.exe /add-driver "r4600.inf" /install
Add-PrinterDriver -name $printdriver
However installing it via Intune I get an event id 215 with failed error code 0x0 HRESULT 0x80070705 on the device.
Any help appreciated.
2 Replies
Hi, printer drivers through Intune can be picky because the script may work interactively as admin but behave differently as SYSTEM.
I would test:
1. Run the install script as SYSTEM using PsExec or a similar test method.
2. Make sure the driver files are packaged inside the Win32 app.
3. Use full paths, not relative paths.
4. Add logging to the script so you can see where it stops.
5. Confirm the driver is signed and allowed by Point and Print restrictions.
Most failures here come down to context, paths, or driver trust. If it works as SYSTEM locally, Intune packaging becomes much easier to troubleshoot.
- Emmitt_ehcmkeTin Contributor
According to:
https://learn.microsoft.com/en-us/troubleshoot/windows-server/printing/event-ids-associated-point-print-restrictions
Those errors are related to point-and-print.Log Name: Microsoft-Windows-PrintService/Admin
Source: Microsoft-Windows-PrintService
Event ID: 215
Description:
Installing printer driver <DriverName> failed, error code 0x23f, HRESULT 0x8007023f. See the event user data for context information.
I deploy a printer via Intune using Powershell. I had similar issues years ago. I had to add some code to determine if the architecture was 32-bit or 64-bit as the Intune Management Extension runs 32-bit regardless of which slider was selected on the script in Intune (Run as 64-bit). This was true at that time. It then called the correct version of pnputil (x86 or x64) based on that.
# Check if the powershell environment is 32-bit or 64-bit and adjusts the path to pnputil.exe accordingly if($env:PROCESSOR_ARCHITECTURE -eq "X86"){ $Installer += "\sysnative\pnputil.exe" Write-Information "The Powershell process being run is: 32-bit" } else { $Installer += "\System32\pnputil.exe" Write-Information "The Powershell process being run is: 64-bit" } $params = @("/add-driver","`"$INFCache`"","/subdirs","/install") start-process $Installer -ArgumentList $params -wait -WindowStyle Hidden Add-PrinterDriver -Name $driver Add-PrinterPort -Name $port -PrinterHostAddress $address Add-Printer -DriverName $driver -Name $name -PortName $portHere are the two articles that helped me then:
WOW64:
https://docs.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-detailsBlog post:
https://www.petervanderwoude.nl/post/using-the-intune-management-extension-on-a-64-bit-platform-for-a-very-happy-new-year/
I hope that helps. Maybe things have changed since then but, this logic still works for me today. Good luck!