Automating network printer deletion and installation

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
tracyprierNetwork AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ganesh Kumar ASr Infrastructure SpecialistCommented:
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
tracyprierNetwork AdministratorAuthor Commented:
I am going from 2003 to 2012 not 2008.

will this still work??
0
Ganesh Kumar ASr Infrastructure SpecialistCommented:
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
Ganesh Kumar ASr Infrastructure SpecialistCommented:
I am going from 2003 to 2012 not 2008.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.