Add Multiple printers sharename remotely on computer with PowerShell

Steve Bona
Steve Bona used Ask the Experts™
on
I need to add multiple printers from my print server to a computer which need those printers
The location of printers are
\\S-PRINT001.domainA.local\LAS0001
\\S-PRINT001.domainA.local\LAS0002
\\S-PRINT001.domainA.local\LAS0003
\\S-PRINT001.domainA.local\LAS0004
\\S-PRINT001.domainA.local\LAS0005
\\S-PRINT001.domainA.local\LAS0006
\\S-PRINT001.domainA.local\LAS0007
\\S-PRINT001.domainA.local\LAS0008
\\S-PRINT001.domainA.local\LAS0009

And the Name of the computer S-APP007.domainA.local

Before write a little script, i try this powershell command in remote session
Add-Printer -ConnectionName "\\S-PRINT001\LAS0001" -CimSession S-APP007
The command doesn't work
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018
Commented:
You're aware that network printers are user specific, not machine specific? So even if done remotely, they would only be available for the account you used to logon to the remote machine.
And there's no real need to deploy printers by script anymore; you can do that with a GPO:
Deploying printers using Group Policy
https://4sysops.com/archives/deploying-printers-using-group-policy/
Steve BonaInformation Technology Specialist

Author

Commented:
Oupsss you're right, I forgot network printers specification, so i will use GPO for my solution
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial