Compare cert salaries and plan your next career move
Hyper-Me wrote: » Do you guys not make use of Group Policy Preferences CSEs? I dont know what id do without them.
On Error Resume Next ' This script will be run against the local computer strComputer = "." ' The next two set commands will query all the printers on the local computer Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery _ ("Select * from Win32_Printer") ' Iterate through the printers found For Each objPrinter in colInstalledPrinters ' Uncomment for some debugging (the printer's name) 'Wscript.Echo "Name: " & objPrinter.Name If objPrinter.Name == "Name_of_old_printer" Then objPrinter.Delete_ End If Next ' Once old printer is gone add the new one Set WshNetwork = CreateObject("WScript.Network") ' Uncomment the second line if you want to set the new printer as the default WshNetwork.AddWindowsPrinterConnection "\\PrintServer1\Name_of_new_printer" 'WshNetwork.SetDefaultPrinter "\\PrintServer1\Name_of_new_printer" Wscript.Quit
Compare salaries for top cybersecurity certifications. Free download for TechExams community.