?
Solved

managing printers via commandline?

Posted on 2005-03-30
4
Medium Priority
?
183 Views
Last Modified: 2013-12-03
I have a hundred workstations with various printer setup schemes.  Most are setup as having local printers which are forwarded to either the printers IP address or \\server\printer-share.

I need to change the target printer IP addresses and share names  for each workstation.
I want to avoid having to go to each workstation , manually logging on , going to control panel > printers, etc and making the change manually.

I can get a remote shell on any PC so I'm looking for commanline utilites so I might script this.

Con2prt isn't a option because the workstations are set up to print to local printers with the ports forwarded to either ip address or \\server\printer  (It's a network printer, but the workstation treats it like it's local - no little pipe underneath the printer in "control > printers")

I'm been playing around with the command:
  rundll32 printui.dll,PrintUIEntry /?
whcih shows hope, but I'm having trouble with how I can get a list of remote printer properties without knowing what printers the user is already hooked up to.

any ideas?

0
Comment
Question by:Marketing_Insists
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Expert Comment

by:sr75
ID: 13668161
You should probably use wmi and a vbscript to obtain and change the printer properties under each workstation.  You could also set the script to automate it so you just run it and let it finish.  When it is done, your network printers will then be all set to the new settings you are attempting.  I don't have time to write you this script, but you should look into it.
0
 

Author Comment

by:Marketing_Insists
ID: 13673072
Ah yes, I've been putting off picking up WMI for too long.

Assuming I know VBscript, where would be a good refference to pick this up?  (books or links)
0
 
LVL 15

Accepted Solution

by:
sr75 earned 1000 total points
ID: 13673096
0
 
LVL 4

Assisted Solution

by:Dowwie
Dowwie earned 1000 total points
ID: 13674997
Here's the two printer wmi objects you want to look at.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_printer.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_tcpipprinterport.asp

NOW KEEP IN MIND THAT you are looking at 2000 so the only way to see local printers is a bit more dificult but there is some code to handle it....

Review this page for more details in general...

http://www.microsoft.com/technet/scriptcenter/resources/qanda/jan05/hey0113.mspx
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question