Help on network printer installation on client machine

Mahesh babu
Mahesh babu used Ask the Experts™
on
No printer installed (screenshot attached - noprinter.jpg)noprinter.png

After executing the command, the printer is installed successfully (screenshot np.png)np.png

Now, if we are trying to install the printer using Powershell remotely, it is giving us error:
PS Microsoft.PowerShell.Core\FileSystem::\\EUX-LAB-server1\SPPrints> Enter-PSSession -ComputerName EUX-LAB-Client4

 

[EUX-LAB-Client4]: PS C:\Users\amtanwar\Documents> Invoke-WmiMethod -ComputerName "EUX-LAB-Client4" -Namespace "root\cimv2" -Class Win32_Printer -Name AddPrinterConnection -ArgumentList \\EUX-LAB-Server3\SamsungLaserPS
Invoke-WmiMethod : Not supported
    + CategoryInfo          : InvalidOperation: (:) [Invoke-WmiMethod], ManagementException
    + FullyQualifiedErrorId : InvokeWMIManagementException,Microsoft.PowerShell.Commands.InvokeWmiMethod







This is the PS cmd I am using to install the printer


Invoke-WmiMethod -ComputerName "EUX-LAB-Client4" -Namespace "root\cimv2" -Class Win32_Printer -Name AddPrinterConnection -ArgumentList \\EUX-LAB-Server3\SamsungLaserPS

I have also tried the options mentioned in  https://community.spiceworks.com/topic/1532379-connecting-to-a-network-printer

The Option 2, worked for installation, but a reboot is required which is not feasible for every user in our environment or any environment to reboot after printer installation.

HOWEVER, if I try to execute this

Invoke-WmiMethod -ComputerName "EUX-LAB-Client4" -Namespace "root\cimv2" -Class Win32_Printer -Name AddPrinterConnection -ArgumentList \\EUX-LAB-Server3\SamsungLaserPS

on the local machine, it is working but we want it to be install remotely (from a server).

any help would be appreciated


OR

Is there a way to install printer from Sharepoint Online (end user)?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
FOXActive Directory/Exchange Engineer
Top Expert 2015

Commented:
Are your clients configured to receive remote commands?
Scroll down to HOW TO CONFIGURE YOUR COMPUTER FOR REMOTING in the below link
ref link:  https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_requirements?view=powershell-6

On a test workstation open powershell as an administrator and run the below command and then  try to add the printer again with your commands
Enable-PSRemoting
Mahesh babuSr. Tech Specialist

Author

Commented:
@FOX

I have tried that, but it is still not working
yo_beeDirector of Information Technology

Commented:
Are these computer on a Domain? Is so why not use GPO with GPP to push them out.

Here is an article I had publish on EE:
https://www.experts-exchange.com/articles/11321/Deploying-Printers-using-Group-Policy-Preferences.html
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

I was thinking group policy as well.  Powershell gets a bit picky running certain commands remotely.
yo_beeDirector of Information Technology

Commented:
Why reinvent the wheel.  If there are proven methods that work and work well.

GPP in my eyes a for of scripts that have been templated and you fill in the blanks
Mahesh babuSr. Tech Specialist

Author

Commented:
Thanks Guys.

GP is not an option. I want to allow any user to install any printer anytime like Cloud Printer

In GP a specific printer is pushed, we don't want that
yo_beeDirector of Information Technology

Commented:
You do not need a script.  If you put a shortcut on everyone's computer to the print server all that have to do is Right Click and select Connect of Double click the printer.  This will install it on their computer.

\\EUX-LAB-Server3\SamsungLaserPS
Mahesh babuSr. Tech Specialist

Author

Commented:
@yo_bee

Thanks, but i am familiar with this approach.

We have more than 100+ printers in our env. So it is not practical to install 100+ shortcuts for every printer.

again my goal is to give user flexibility to install any printer anytime where ever he is. He should not waste time for local iT to do it for him

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