Copying Print Queues

The IADsContainer interface on a computer object supports copying print queues from one computer to another. Copying a print queue includes copying the printer driver and the print queue from the source to the destination. All settings of the source print queue and its printer driver are copied to the destination. The security and audit permissions on the destination PrintQueue are also copied. These permissions are not migrated, that is no changes are made to them.

The name specified as the parameter in CopyHere() is used as the share name of the destination print queue. The print queue name is the same as that of the source print queue.


The current jobs in the source PrintQueue are not copied.

Copying of Line Printer Remote (LPR) ports is not yet supported. Copying a Print Queue attached to a LPR will work only if the LPR port is already installed on the destination computer.


Dim pq As IADsPrintQueue
Dim comp as IADsContainer

'Bind to the computer to which the Print Queue is to be copied.

Set comp = GetObject("NTDS://DomainName/DestinationComputer")

'Copy the PrintQueue from SourceComputer. Use the name share name

Set pq = comp.CopyHere("NTDS://DomainName/SourceComputerName/PrintQueue", "")

Debug.Print pq.PrinterPath, pq.ADsPath, pq.Name


See Also