We’ll be using pstools, rundll, and WMIC to do this.
Download the PsTools suite and extract Open a CMD window and change directory to the extracted PsTools location Start a CMD session on the remote machine using psexec:
> psexec \remote-machine cmdAfter connecting, list the printers available on the machine:
> wmic printer get name
Name printer1 printer2 \servernameprinter3
If you want to make printer1 above shared:
> rundll32 printui.dll,PrintUIEntry /Xs /n "printer1" Sharename "Printer1" > rundll32 printui.dll,PrintUIEntry /q /Xs /n "printer1" Attributes SharedConfirm the printer is available by going to \remote-machine in Windows Explorer; you should see the printer available now.