Option Explicit Dim objWMIService, objPrinter, colItems, strComputer Dom , objWshShell, strDefaultState strComputer ="." Set objWshShell = WScript.CreateObject("WScript.Shell") Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ "\root\CIMV2") Set colItems = objWMIService.ExecQuery _ ("SELECT * FROM Win32_Printer") ' On Error Resume Next For Each objPrinter In colItems If UCase(objPrinter.DeviceID) = UCase("\\savdalprinterOld\printer1") Then Wscript.Echo "Found match " & objPrinter.DeviceID & _ ", replacing" ' Add new printer. Need the ,1,true to wait ‘for shell to complete before continue objWshShell.Run "rundll32 printui.dll,PrintUIEntry /in /Gw /q /n \\savdaldc01\printerNew",1, true ' Remove the old objWshShell.Run "rundll32 printui.dll,PrintUIEntry /dn /q /n \\savdalprinterOld\printer1",1, true If objPrinter.Default Then ' if it's the default set as default objWshShell.Run "rundll32 printui.dll,PrintUIEntry /y /n \\savdaldc01\printerNew",1, true End If End If Next WScript.Quit