Forum Discussion
ABill1
Oct 12, 2023Iron Contributor
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" $drive...
- Oct 16, 2023Seems 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?
rahuljindal-MVP
Oct 12, 2023Bronze Contributor
Maybe this can help - https://rahuljindalmyit.blogspot.com/2021/01/intune-configure-printers-for-non.html
- Oct 12, 2023Or this one : https://powershellisfun.com/2022/12/05/adding-printer-drivers-and-printers-using-microsoft-intune-and-powershell/
- ABill1Oct 13, 2023Iron Contributor
This worked if I run the script locally but via intune I get this error:
Any ideas?
Aran- Oct 13, 2023I suggest adding Start-Transcript c:\windows\temp\log.txt at the top of the script and Stop-Transcript at the end. After deployment, check the logs to see what's going on. Are you running it as System?
- ABill1Oct 16, 2023Iron ContributorHi,
It doesnt seem to even get that far to create the logs..
The only difference I can see is in the install.cmd I use the command is all lowercase and the file includes uppercase letters would that make a difference?
So command within install.cmd is powershell.exe -executionpolicy bypass -file .\add_printers.ps1 the ps1 is put uppercase Add_Printers.ps1- Oct 16, 2023It's not case-sensitive. That shouldn't make any difference. Could you post a screenshot of your files in a folder, the installation command in Intune, and the contents of the install.cmd? (It's not install.cmd.txt I hope, I helped somebody else who had that as the filename because he didn't have show extensions enabled in the Windows Explorer)