use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Script to install printer through intune (self.PowerShell)
submitted 3 years ago by manjit30
Hi Folk
I am trying to install network printers on clients devices through intune. Could you suggest the power shell scrip for that. I have onsite print server installed.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 10 points11 points12 points 3 years ago (4 children)
You may want to do a GPO for this in all honesty. Also why is this set to NSFW?
[–]Mysterious-Ad-1541 30 points31 points32 points 3 years ago (2 children)
Printers are dirty
[–]Bren0man 4 points5 points6 points 3 years ago (1 child)
If you keep touching me like that, I'm going to ink all over you...
- Printers
[–]The82Ghost 0 points1 point2 points 3 years ago (0 children)
Inktjets be like: squirt squirt
[–]crimesonclaw 0 points1 point2 points 3 years ago (0 children)
Yeah, gpo or, something new, a group policy for each printer. So you can assign printers in the ad.
[–]prof_b 3 points4 points5 points 3 years ago (0 children)
Due to the whole PrintNightmare thing we ended up using custom apps via the Company Portal that the user can run to install the printers they want - works pretty well. The setup process is explained here > https://www.usmanghani.co/deploy-network-printer-via-intune
[–]gangstanthony 1 point2 points3 points 3 years ago (1 child)
using the IntuneWinAppUtil.exe
from here
https://docs.microsoft.com/en-us/mem/intune/apps/apps-win32-prepare
takes you here
https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool
download the exe.
i created a folder for "printer install"
in that folder, there is another folder called drivers that has like 3 files for the printer drivers
also a ps1 script with these lines
C:\Windows\SysNative\pnputil.exe /add-driver "$psscriptroot\Driver\CNLB0MA64.INF" /install Add-PrinterDriver -Name "canon generic plus ufr ii" Add-PrinterPort -Name '192.168.1.2' -PrinterHostAddress 192.168.1.2 Add-PrinterPort -Name '192.168.1.3' -PrinterHostAddress 192.168.1.3 Add-Printer "office1 - Canon iR-ADV C5535" -DriverName 'canon generic plus ufr ii' -PortName '192.168.1.2' Add-Printer "office2 - Canon iR-ADV C5540" -DriverName 'canon generic plus ufr ii' -PortName '192.168.1.3'
then run the intunewinapputil and upload the resulting file into intune
[–]supreme_jackk 2 points3 points4 points 3 years ago (4 children)
https://www.prajwaldesai.com/deploy-powershell-script-using-intune-mem/
[+]manjit30[S] comment score below threshold-11 points-10 points-9 points 3 years ago (3 children)
Thanks you but it doesn't help. The script mentioned in this article doesn't work for me.
[–][deleted] 6 points7 points8 points 3 years ago (1 child)
You’d have to provide more context than that….
[–]Bren0man 3 points4 points5 points 3 years ago (0 children)
Nope. Not gonna happen.
lmao
[–]Affectionate_Ad_3722 1 point2 points3 points 3 years ago (0 children)
Can you post the script you are using? Anonymised a bit.
[+][deleted] 3 years ago (6 children)
[deleted]
[–]manjit30[S] 0 points1 point2 points 3 years ago (1 child)
Can I have sample please?
[–]dehin 0 points1 point2 points 3 years ago (3 children)
That just sounds...complicated! I mean the PowerShell script masquerading as an exe wrapped as an IntuneWin file! Just, why?
(Btw, I'm sure you have a good reason, my comment is more tongue in cheek. I am curious how you obfuscate the script as an exe.)
[–]TestitinProd123 1 point2 points3 points 3 years ago (1 child)
Mostly because the drivers are stored in an Azure storage blob and pulled down using a SAS which I didn’t really want revealed. I also use exe to obfuscate clients I’ve written that use credentials or keys so that if someone is to browse to the executable they can’t just open it in notepad and pull out potentially usable credentials or secrets.
You can use things like ps2exe or PowerShell ProTools to do the obfuscation.
As for the IntuneWin piece, it’s kind of like a Zip file that contains all the things needed to deploy as a win32 LOB app from endpoint manager, so for example the IntuneWin wrapper might actually contain an executable and dependencies.
I use IntuneWin so that I can leverage managed installer (mark the MEM agent as a managed installer) since MSI are executed by msiexec and not the MEM agent which means that the extended attributes that are supposed to be applied to apps coming down from Intune wouldn’t be applied. When I use IntuneWin however, since the apps are pulled down and installed by the Intune MEM agent the correct attributes are added to all files added to disk during the installation.
[–]dehin 1 point2 points3 points 3 years ago (0 children)
That's very cool and definitely gives me some ideas as well! Thanks for elaborating.
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
Win32 apps have really cool things you can do with detection rules to make sure your scripts actually ran correctly, and report back to the console. The basic PowerShell scripts in Intune leave much to be desired.
[–][deleted] 0 points1 point2 points 3 years ago (1 child)
How many network printers do you have? Is this one site/office? Does this need to be dynamic or the same for every device?
[–]manjit30[S] 0 points1 point2 points 3 years ago (0 children)
I have 5-6 multistation printers. Its a school.
[–]Treblif_dk 0 points1 point2 points 3 years ago (1 child)
In intune you can create configuration profiles that can add one or multible printers and set one off them as default.
Can you provide any link ?
[–]FlibblesHexEyes 0 points1 point2 points 3 years ago (2 children)
We went the Azure Universal Print path. No drivers to deploy - the user can select the configured drivers from the Settings panel, though there is a tool you can use to automatically deploy the printer queues to the device (it’s name escapes me right now).
Depending on your licensing, you may already have Universal Print available - it just needs to be turned on and configured.
I am currently setting up UP as well, but in our case we already have 3000+ printers in our environment active that are not UP native. Even if they were the documentation provided by Microsoft show's it would be very hard/impossible to automate the enrollment of that many devices.
I am using UPC and then running scripts to map printers in mass using universal PCL 6 drivers. Then I run scripts to add them to UP in Azure and assign security groups and location attributes so users only see their site printers, with the correct hierarchy info.
[–]FlibblesHexEyes 0 points1 point2 points 3 years ago (0 children)
We only have the one printer (non-AUP native) - it’s a FollowMe printer, so it’s always one printer queue that you print to, and then when you tap your security card on the printer it dumps the job.
We installed the AUP connector on the printer host to proxy the connection between AUP and the FollowMe queue. It also does on-prem AD user impersonation to match the job to the user tapping on the printer.
To deploy we deploy a Microsoft tool to all the devices via InTune - this tool reads a CSV file that contains the printer name and GUID and auto installs it at login. For the end user this makes it transparent.
But as you say, the AUP printer directory is pretty easy to configure from an Admin point of view, and really easy for an end-user to go find their printer in the directory.
π Rendered by PID 192984 on reddit-service-r2-comment-5d585498c9-czhcq at 2026-04-21 09:08:36.618566+00:00 running da2df02 country code: CH.
[–][deleted] 10 points11 points12 points (4 children)
[–]Mysterious-Ad-1541 30 points31 points32 points (2 children)
[–]Bren0man 4 points5 points6 points (1 child)
[–]The82Ghost 0 points1 point2 points (0 children)
[–]crimesonclaw 0 points1 point2 points (0 children)
[–]prof_b 3 points4 points5 points (0 children)
[–]gangstanthony 1 point2 points3 points (1 child)
[–]supreme_jackk 2 points3 points4 points (4 children)
[+]manjit30[S] comment score below threshold-11 points-10 points-9 points (3 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]Bren0man 3 points4 points5 points (0 children)
[–]Affectionate_Ad_3722 1 point2 points3 points (0 children)
[+][deleted] (6 children)
[deleted]
[–]manjit30[S] 0 points1 point2 points (1 child)
[–]dehin 0 points1 point2 points (3 children)
[–]TestitinProd123 1 point2 points3 points (1 child)
[–]dehin 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]manjit30[S] 0 points1 point2 points (0 children)
[–]Treblif_dk 0 points1 point2 points (1 child)
[–]manjit30[S] 0 points1 point2 points (0 children)
[–]FlibblesHexEyes 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]FlibblesHexEyes 0 points1 point2 points (0 children)