Solved

Automating network printer deletion and installation

Posted on 2014-09-28
4
108 Views
Last Modified: 2014-10-02
Hello all :)

I am upgrading some wintel servers from 2003 to 2012.

I am at the point now when I need to migrate/set up the print server function.

These servers are running on VMware so I have set up the new file print server running next to the existing 2003 server.

Is there any way to migrate the existing print server setup to the new server?

If not I can manually set up the printers on the new server.

Second question: is there a way to automate the process of deleting the network printers from each users PC (running Win7) and installing the new printer on the new server?

Quite a bit of manual leg work otherwise :(

thanks
Tracy
0
Comment
Question by:tracyprier
  • 3
4 Comments
 
LVL 10

Expert Comment

by:Ganesh Kumar A
ID: 40349218
To manage the migration process, use one of the following:

The Printer Migration Wizard, which you access through Print Management, a snap-in in Microsoft Management Console (MMC).
The Printbrm.exe command-line tool.
Before you can start the migration process, you must ensure the Print and Document Services role is installed on the destination server (PRNT-SRV in our case).

1- Backup the source server (our 2008 R2 server) using the Printer Migration Wizard

From our Windows Server 2012 we will use the Print Management console to perform the Migration.

1- Open Server Manager, click Tools, and then click Print Management.

2- Right Click Print Management, and select Migrate Printer

PS Mig 2

3- Select “Export printer queues and printer drivers to a file”  and click Next

 

image

4- Provide the Server name from which you want to extract to printer queues and drivers. and click next.

 

image

5- Review the list and click Next

 

image

6- Provide a location and a file name to save the extracted data and click Next

 

image

7- When the export is complete click Finish.

image

2- Restore printers to the destination server (PRNT-SRV) using the Printer Migration Wizard

1- Right-click Print Management, and then click Migrate Printers to open the Printer Migration Wizard. Select Import printer queues and printer drivers from a file, and then click Next

After selecting the file we created when we exported the Print Queues and drivers, click Next

image

 

2- Review the printers to be imported and click Next.

image

3- Select “This Print Server (\\PRNT-SRV)” if you are running the Print Management console from the target server, or select the appropriate server in your domain by selecting “A print server on the network”

 image

4- Set the import options and click Next

image

Wen the wizard completes, ensure that you do not have any errors, test the printers,

View event log messages about the migration.
Manually check the destination server for each printer migrated from the source server.
Verify that the printer associated with each printer queue is online
Confirm that a printer queue’s special settings, permissions, or drivers were preserved during the migration
Check the properties for each queue on the destination server and verify that any special settings are still applicable.
If the driver installs any non-standard settings that have been altered as a result of the migration, verify those as well
Make any necessary changes, such as adding a port monitor or a new driver
If you are using Active Directory Domain Services (AD DS) to publish printers, do not publish printers to AD  when you restore printers. This prevents duplicate printers from being displayed by AD DS before the destination server configuration is verified.

On the source server, you must unpublish printers before renaming the source server. To do this, select all printers in the Print Management snap-in, right-click the selected printers, and then click Remove from Directory. This prevents printers from being published twice to AD when the source server is renamed.

After renaming the destination server to the source server’s original name, you can publish all printers on the destination server to AD DS. To do this, select all printers in the Print Management snap-in, right-click the selected printers, and then click List in directory.

Reference : http://technet.microsoft.com/en-us/library/jj134150.aspx
0
 

Author Comment

by:tracyprier
ID: 40349220
I am going from 2003 to 2012 not 2008.

will this still work??
0
 
LVL 10

Expert Comment

by:Ganesh Kumar A
ID: 40349230
This is script which deletes all network printer alone. You need to run this script on the workstations, if you already have any printer setup pushed through GPO remove it first.

You can either push this script as logon script using GPO to make all the network printers to get deleted.


'=================================================================
'In the NAME_OF_THE_SERVER you need to replace with your printserver name.
'=================================================================
Option Explicit

  On Error Resume Next

  Dim objNetwork
  Dim objPrinters, ix
  Set objNetwork = CreateObject("WScript.Network")
  Set objPrinters = objNetwork.EnumPrinterConnections

  ' ### Delete all currently installed network printers
  For ix= 0 to objPrinters.Count - 1 Step 2
   Dim sPrinter, sUNCPath
   sPrinter = objPrinters.Item(ix)
   sUNCPath = objPrinters.Item(ix+1)

   If InStr(1, sPrinter, "NAME_OF_SERVER", 1) > 0 Then
    objNetwork.RemovePrinterConnection sPrinter, True, True
   ElseIf InStr(1, sUNCPath, "NAME_OF_SERVER", 1) > 0 Then
    objNetwork.RemovePrinterConnection sUNCPath, True, True
   End If

   If Err <> 0 Then
    Wscript.Echo "Error deleting printer: " & Err.Description
    Err.Clear
   End If
  Next
0
 
LVL 10

Accepted Solution

by:
Ganesh Kumar A earned 500 total points
ID: 40349233
I am going from 2003 to 2012 not 2008.

will this still work?? Yes it works on 2012.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now