Migrate /Backup /Restore a printer from Source Computer to Destination Computer

jskfan
jskfan used Ask the Experts™
on
Migrate /Backup /Restore a printer from Source Computer to Destination Computer

I would like to have a a printer installed on one computer and the same printer will be installed on other computers. There is no Print Server.

I found this link that talks about that:

https://www.robvanderwoude.com/printtools.php

it also has printer commands on this link:
https://www.robvanderwoude.com/2kprintcontrol.php


Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017

Commented:
Not sure I understand, though install on one, while sharing. Then add this shared printer on any new system, then change it to direct.

Deals with getting drivers from the system sharing the printer.
On the second, add a TCP/ip port with ip if the printer, and then bind the printer to the new TCP/ip port.

Which printer make?

Main issue is whether the printer in question has drivers included in Windows.
If it is an HP as an example whose drivers are included in the OS.

You could look at powershell, vbscript net use to create the printer by correctly pointing at the driver..
Dimitris MaleasData recovery engineer

Commented:
Hi,
If the printers are network printers use the scripts on this page
https://www.alexcomputerbubble.com/backup-and-restore-printers-with-powershell/

Author

Commented:
Printers Install  Scripts were not successful for me. I posted a bunch of questions about that, I did not get help
The Scripts will install printer on remote computer, but  it will not print..

I thought probably if you install local printer[TCP/IP Standard] then back it up to somewhere in the network, then from another computer restore  it , that might do the job.
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

Distinguished Expert 2017

Commented:
What you are talking requires the drivers for the printer to be locally available.
Much depends on the printer at hand.
In a non-domain environment, you have  to access each system any way, might as well do it right from the start.

Inevitably some may not work for ... And would require a secondary debug, .......

Author

Commented:
yes..
if I go to a computer and install the printer, the manufacturer and drivers are available in the Add printer Wizard..
Distinguished Expert 2017

Commented:
The powershell example of migrating/transferring shoukd work.

The issues often arise are with the spoiler.

How many systems are we talking about?

Author

Commented:
let's try it with one remote computer
Distinguished Expert 2017

Commented:
Commonly it is used on server platform for transition

https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-for-057ae37a

Try the example dimitris provided.

The other to see is using wmi

Much in a non domain environment depends on the Windows firewall and whether it allows remote access.

Author

Commented:
I guess you misunderstood my question.

Let 's say I have local (TCP/IP standard) printer installed on PC1
the same printer needs to be installed on PC2,PC3.....PCn

I thought if I backup the printer that is installed on PC1, I can restore it to PC2,PC3.....PCn

is it possible ?

I found  this link :https://msfn.org/board/topic/26296-installing-network-printers-silently-heres-how/

it seems like this guy was able to get a printer installed on one PC and then  exported the registry he specified to a .reg file , and probable he deployed that .reg file along with the script to other PCs...

but the way he explained is a little bit not clear to me
Distinguished Expert 2017

Commented:
that is exactly what it was, but as you note you have to have the paths to the INF file and the ....
c:\windows\system32\inf etc.

that is the issue when one is using powershell as well or net use to define a new printer...

The issue is that you are not in a domain environment, so not sure how you are thinking of pushing the printer ....
windows 10 has auto-dicovery, but the printer might have to be .....

In a situation such as yours, I commonly do what I had suggested after the printer is added and shared. I add the shared printer and then modify the references ......
That rundll32.... is an older printui.. reference.....
The powershell script is for servers, but it enumerates the printers/shares on the system where the script runs so that they can be imported/setup on the new server...

You could try whether it will list the printer on the base system and then see whether you can use the results to setup the printer on another system,..

Author

Commented:
I do not want you to worry about the computer is or is not in the Domain....We can make it member of the Domain..

can you do a test by installing an HP printer [with HP Universal Printing PCL 6 as a driver] on a remote computer with a Script ?
Distinguished Expert 2017

Commented:
Universal means, you used hp's installer to setup the printer?
As noted, in a scenario such as yours, I use the course of action I suggested.

Author

Commented:
if I am logged in to a computer locally I just run Add Printer Wizard and select the "HP Universal Printing PCL 6" as a driver...everything works fine.

I want an Expert to help me install the printer on a remote computer using a script or command line...or something like that....
I have seen many suggestions from many people but no one has tested it to make sure it worked...
Distinguished Expert 2017

Commented:
Please try the powershell script posted that deals with helping an admin transfer shares and printers.
Run the powershell script to see what it shows.
Then try using the result to setup the printer on the new computer.

There similarly are vbscripts that do the same thing.
I do not believe the printer and devices control panel, or however the printer is presented provides a backup or restore option.

The various scripts deal with extracting the current config and commonly provide the commands that need to be run to get it added ...

Author

Commented:
I have used VBscript for printers included with windows OS.
I can add printer to remote computer but it does not print
I think the issue is with Registry...
I found this link: https://msfn.org/board/topic/26296-installing-network-printers-silently-heres-how/

but it is not clearly explained...
Can you read it and maybe you can come up with better conclusion ?

Thank you
Distinguished Expert 2017

Commented:
You are using/referencing an older rundll/printui interface.

Which vbscript are you using? Ties into wmi, or using psexec?

Please consider looking at a more modern approach to printer addition...

Author

Commented:
if you check in this path below, on your windows computer, you will find a bunch of Printing Scripts that comes with the Operating system:
C:\Windows\System32\Printing_Admin_Scripts\en-US


I have used: PrnPort.vbs , Prndrvr, Prnmngr
I was able to get the Printer Installed on Remote Computer, but unable to Print from it...
On the Local computer, for instance if I install the printer via the Scripts, it will install properly and I can print...This might tell you something

**If you have 2 computers, please try to install a Standard TCP/IP printer with driver "HP Universal Printing PCL 6"  , and paste  the Code here, so that I can try it .... Whatever approach works for you will be fine
Thank you
Distinguished Expert 2017

Commented:
When you can not print, where is the error. In the spool pending or it errors in the print i.e. get error about the printing system?

Is the spool service running past install.

While you are adding tcp/ip properties of the printer, is it bound to this port?

The steps/commands are one thing, the resulting config might have a small variation as simple as the printer instead of being attached to a tcp/ip it is bound to something else resulting in the job being stuck in the spool.

Author

Commented:
here is the error.. when I try to check the properties of the printer on a remote computer after the Script installs the printer
p
I tried several scripts , one of them is here:
for /f %%a in (C:\Scripts\CalledScripts\CompOnly.CSV) do (


@echo Creating Printer Port on %%a
 cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\prnport.vbs" -a  -s %%a -r "Printerhostname" -h hostname -o raw -n 9100


cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\Prndrvr.vbs" -a   -m "HP Universal Printing PCL 6"  -h "sccm\hp drivers\hpcu230u.inf" -s %%a



@echo Setting Printer on %%a
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -a -p "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a




)

Open in new window

Distinguished Expert 2017

Commented:
The error seems to point to your "Printer Queue Name" designation as the issue.

The queue name ........ Of the installed printer......

Author

Commented:
have you tried to install a printer on a remote computer using a Script ?
If you have 2 Networked computers either physical or virtual, please try it and let me know if you were successful..
Thank you
Distinguished Expert 2017

Commented:
As I noted in my suggestion, the scope of the need did not require the extensive process. Used the script I posted that dealt with migrating printers/shares from servers.
In most cases I am in an AD environment and use printer server and GPO to push printers.

So the direct answer is no.
Distinguished Expert 2017

Commented:
With that said, the error you get is not the printer did not install, the issue is that it tied to a queue that does not exist.

Author

Commented:

With that said, the error you get is not the printer did not install, the issue is that it tied to a queue that does not exist.

Of Course the Queue should not exist before you create it...
I see You are thinking Print Server , where the Print Queue already exists on the server...
This is a different case scenario....I am not sure if I am clear in my Question... I believe it is simple:

Current Manual Printer Install:
  -- Go to each Computer, run the Add Printer Wizard, Select Local Printer, TCP/IP Standard,  Provide the Hostname of the printer, Select HP as Manufacturer , "HP Universal Printing PCL 6"  as a driver... Next ...Next.... and it will install the local Printer.

Goal:
How to Automate Current Manual Print Install
Distinguished Expert 2017

Commented:
you need to use the prnqctl.vbs

In your example you run printer setup, prnmngr.vbs before you created the queue while setting a queue that does not exist.

Here is a writeup of the tools you are using.

https://www.techrepublic.com/blog/windows-and-office/discover-the-power-of-windows-7-hidden-vbscript-print-utilities/
Distinguished Expert 2017

Commented:
missed you are not defining the queue.
-q "QueueName" you have -p "Printer Queue Name"

Try the following instead in your script                                                                              v
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -a -q "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a

Author

Commented:
are you sure there is -q switch...?
it is not recognized ...
Distinguished Expert 2017
the queue definition in the link uses -q
Distinguished Expert 2017
prnports.vbs is where the queue can be defined, optional.
Relied on the data I. The quotes.

Your prnmngr.vbs identifies the printer -p as "Printer Queue Name"
-p is supposed to identify the printer being added...

Author

Commented:
ok you meant Prnport.vbs
Distinguished Expert 2017
You should recheck the scripting command you are using and their options.
Yes.


You are running through a loop of perhaps multiple printers to be added, though PortName, printer name use static names.

Author

Commented:
Thanks Arnold..
The error on the screenshot previously pasted does not show on certain computers now... it shows only on one computer...

I will test that at work and see...

Thanks for your Help

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