'*********************************************************** '** moveprinters.vbs '** Move Printers Script '** 05 DEC 07 '** Jase McCarty '** '** Use of this script at your own risk/discretion '** I will not be held liable for any issues resulting from '** use of this script. '*********************************************************** On Error Resume Next Dim strComputer Dim objWMIService Dim colItems Dim WshNetwork Set WshNetwork = WScript.CreateObject("WScript.Network") strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_Printer",,48) For Each objItem in colItems If objItem.ServerName = "\\OLDSERVER" then WshNetwork.RemovePrinterConnection objItem.ServerName & "\" & objItem.ShareName, true, true WshNetwork.AddWindowsPrinterConnection "\\NEWSERVER\" & objItem.Sharename End If Next