mullet_man Posted July 3, 2007 Posted July 3, 2007 Anyone know of a quick printer script to rename networked printers on clients? There is one over at Microsoft but I can't seem to get it working. I am a novice when it comes to scripts. Any pointers would be really great. Ste.
t_guest Posted July 3, 2007 Posted July 3, 2007 Well, if your printer is connected to a Windows 2000 or Windows NT 4.0 print server i have bad news for you: you can’t rename a printer using a script, at least not using the technologies included in the operating system. (There might, or might not, be third-party tools that enable you to do this on those older versions of Windows.) If your printer is connected to a computer running Windows XP or Windows Server 2003, however, the news is much better. try this it might help strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colPrinters = objWMIService.ExecQuery _ ("Select * From Win32_Printer Where DeviceID = 'HP'") For Each objPrinter in colPrinters objPrinter.RenamePrinter("ArtDepartmentPrinter") Next Set colPrinters = objWMIService.ExecQuery _ ("Select * From Win32_Printer Where DeviceID = 'ArtDepartmentPrinter' ") For Each objPrinter in colPrinters objPrinter.ShareName = "ArtDepartmentPrinter" objPrinter.Put_
mullet_man Posted July 3, 2007 Author Posted July 3, 2007 Thanks callumtuckey Thats the script from Microsoft, I can get it to rename local printers no problem, but had no luck networked printers. Was hoping to get it to rename networked printers so networked printers are not called Technology on server etc, just Technology. I'll take a closer look tomorrow, might have missed something.
t_guest Posted July 3, 2007 Posted July 3, 2007 just have another go at it hope it works fingers crossed
contink Posted July 3, 2007 Posted July 3, 2007 Was hoping to get it to rename networked printers so networked printers are not called Technology on server etc, just Technology. I don't think you can do this using renaming... It may be a GPO setting or something but I suspect the "..on server" part is mandatory.
mullet_man Posted July 4, 2007 Author Posted July 4, 2007 Can't seem to get this working, if it can be done at all?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now