This is a little script I wrote that unmaps printers on one server and remaps 
them on another server. To use it, you'll need to set the appropriate server 
name in the ReMap Sub and then create pairs of Case statements in the Process 
Sub, specifying what the old mapping looks like and the name of the printer on 
the new server. If you wanted, you could add a Case else statement to unmap all 
other printers. That would clear up your ghosts, but would have the (possibly 
unfortunate) side effect of removing all mappings expect ones you've officially 
sanctioned.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Kuhlman, Donald
Sent: Thursday, August 28, 2014 11:42 AM
To: [email protected]
Subject: RE: [NTSysADM] Printer managment

Gavin, I don't know if this will help you but we did some testing with this on 
Windows 7, Windows 8 and it worked.

This is an old program by "Foxware Design" called PrintMig (not the MS version) 
It will switch an existing user's printer(s) from one server to another and it 
can use another name. You provide an .ini file with the mapping from the old to 
the new and have the user run it.  Can be done through SCCM, Login script, etc. 
or on a user by user basis.

http://windows.softwareweb.com/printmig-3.15-1MF.html

Summary:

The Printer Migration Manager for Windows 95/98/NT allows you to automatically 
remap a users current set of network printers to different network printer 
queues. PrintMig will work on Novell NetWare or Microsoft Windows NT Networks. 
By using a mapping file, you control what printers are migrated. All events are 
logged so you know exactly what was updated on the client.

Don K
-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Gavin Wilby
Sent: Thursday, August 28, 2014 11:20 AM
To: '[email protected]'
Subject: RE: [NTSysADM] Printer managment

Hi,

Normally Id be using GPP all the way, but the issue I have (that’s not of my 
making) is:

We have two print servers.

One is a 2003 server, one a 2012.

The 2003 is being retired the 2012 is to take over its role.

All printers in the building, which is about 100 odd, across 7 floors and close 
to 200 users are replicated across both servers.

There is also the problem that lots of users have old ghost printers, as well 
as the fact that I need to get them.

So if I have a user with two printers oldps\print1 and oldps\print2 I need them 
to have newps\print1 and newps\print2.

Then imagine that with users that have 7 or more print queues etc.

Gavin Wilby
IT Support Engineer


-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Ben Scott
Sent: 28 August 2014 16:48
To: [email protected]
Subject: Re: [NTSysADM] Printer managment

On Thu, Aug 28, 2014 at 10:31 AM, Gavin Wilby <[email protected]> 
wrote:
> I need to be able to point something at any PC on my domain and see 
> what printers it has installed on it.

  You don't describe your environment, but any Windows that's reasonably recent 
will have useful tools in

C:\Windows\System32\Printing_Admin_Scripts\en-US\

  The "prnmngr.vbs" script in particular will list printer objects, and allow 
you to add/remove them.

  There is an "-s" switch which lets you run it against remote print servers 
("server" meaning "computer" in this case).  This is generally only useful for 
printers with a machine-local port connection (but that includes IP ports).

> This should include Network printers, local printers and PDF writers etc.

  Network printer connections (via Windows shares) are a property of the user, 
not the system.

> Id like the ability to remove printers (say ghosted ones), and also 
> manually add printers off the network.

  You're prolly better off using Group Policy Preferences to push printers to 
users.  But the above-mentioned scripts can do it, too.

-- Ben



SMP Partners Limited, SMP Trustees Limited and SMP Fund Services Limited are 
licensed by the Isle of Man Financial Supervision Commission. SMP Accounting & 
Tax Limited is a member of the ICAEW Practice Assurance Scheme.

SMP Partners Limited registered in the Isle of Man, Company Registration No: 
000908V
Directors: M.W. Denton, M.J. Derbyshire, P.N. Eckersley, S.E McGowan, O. Peck, 
J.J. Scott, S.J. Turner

SMP Trustees Limited registered in the Isle of Man, Company Registration No: 
068396C
Directors: A.C. Baggesen, M.W. Denton, O. Peck, J.J. Scott, J. Watterson, J. 
Cubbon

SMP Fund Services Limited registered in the Isle of Man, Company Registration 
No: 120288C
Directors: V. Campbell, M.W. Denton, P.N. Eckersley, D.A. Manser, S.E McGowan, 
O. Peck, J.J. Scott, R.K. Corkill 

SMP Accounting & Tax Limited registered in the Isle of Man, Company 
Registration No: 001316V
Directors: I.F. Begley, A.J. Dowling, P. Duchars, P.N. Eckersley, J.J. Scott, 
S.J. Turner

SMP Capital Markets Limited registered in the Isle of Man, Company Registration 
No: 002438V
Directors: M.W. Denton, M.J. Derbyshire, D.F Hudson, S.E McGowan, O. Peck, J.J. 
Scott.

SMP Partners Limited, SMP Trustees Limited, SMP Fund Services Limited, SMP 
Accounting & Tax Limited and SMP Capital Markets Limited are members of the SMP 
Partners Group of Companies.

This email is confidential and is subject to disclaimers. Details can be found 
at: http://www.smppartners.com/disclaimer.asp

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com 
______________________________________________________________________
Option Explicit
Dim objWMIService, colPrinters, objNetwork, objPrinter

Set objNetwork = CreateObject("WScript.Network") 
Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2")
Set colPrinters = objWMIService.ExecQuery ("Select * From Win32_Printer")

For Each objPrinter in colPrinters
    Process objPrinter.Default, objPrinter.Name
Next

Set colPrinters = Nothing
Set objWMIService = Nothing
Set objNetwork = Nothing

Sub UnMap (strPrinter)
        objNetwork.RemovePrinterConnection strPrinter, True, True
End Sub

Sub ReMap (boolDefault, strPrinter, strNewPrinter)
        objNetwork.RemovePrinterConnection strPrinter, True, True
        objNetwork.AddWindowsPrinterConnection "\\NEW_PRINTSERVER\" & 
strNewPrinter
        If boolDefault Then
                objNetwork.SetDefaultPrinter "\\NEW_PRINTSERVER\" & 
strNewPrinter
        End If
End Sub


Sub Process (boolDefault, strPrinter)
        Select Case LCase(strPrinter)
                Case "\\old_print_server\printer_name1"
                        ReMap boolDefault, strPrinter, "PrinterNameOnNewServer1"
                Case "\\old_print_server\printer_name2"
                        ReMap boolDefault, strPrinter, "PrinterNameOnNewServer2"
                Case "\\old_print_server\printer_name3"
                        UnMap strPrinter
        End Select
End Sub

Reply via email to