Forum Discussion

ABill1's avatar
ABill1
Iron Contributor
Oct 12, 2023

deploying printer via intune

Hello everyone,

 

I'm in need of assistance with the following script I'm currently using: powershell

 

# Replace the placeholders with your details

$inf_path = ".\driver\KOBxxK__01.inf"

$driver_name = "KONICA MINOLTA Universal V4 PCL"

$driver_path = "C:\Windows\System32\DriverStore\FileRepository\KOBxxK__01.inf"

$printer_name = "Konica 1"

$port_name = “USED MY IP”

$printer_ip_address = “USED MY IP”

 

# Install the driver using Pnputil

pnputil.exe /add-driver "$inf_path"

 

# Add the printer driver using Add-PrinterDriver

Add-PrinterDriver -Name "$driver_name" -InfPath "$driver_path"

 

# Add the printer port using Add-PrinterPort

Add-PrinterPort -Name "$port_name" -PrinterHostAddress "$printer_ip_address"

 

# Add the printer using Add-Printer

Add-Printer -DriverName "$driver_name" -Name "$printer_name" -PortName "$port_name"

 

My objective is to remotely install a Konica printer via Intune using PowerShell. However, I've been unable to get this script to function properly. I placed this script in the folder located before the "Driver" folder.

 

The error 

 

 

 

Could someone please assist me with this issue?

 

 

 

 

  • Seems ok if you copy all the files in a folder on a test machine (Or Windows Sandbox) and run install.cmd as Administrator... Does that work?

Resources