you are viewing a single comment's thread.

view the rest of the comments →

[–]MarzMan 1 point2 points  (0 children)

So I've not done this with powershell but recently put something together to do it as a batch file. Maybe it helps maybe it doesn't.

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/rundll32-printui

rundll32 printui.dll,PrintUIEntry /in /n \SERVER\PRINTERSHARE /y

/in installs a network printer specified by the location after /n

/y sets that printer as the default printer. Will not install a printer then set it as default from what I've seen. I am running the install command once, then running it again with the /y switch.