managing printers via commandline?

Posted on 2005-03-30
Medium Priority
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?

Question by:Marketing_Insists
  • 2
LVL 15

Expert Comment

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.

Author Comment

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)
LVL 15

Accepted Solution

sr75 earned 1000 total points
ID: 13673096

Assisted Solution

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



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...


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 Month8 days, 19 hours left to enroll

621 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