Active Directory and Printer Mapping.

Posted on 2003-03-10
Medium Priority
Last Modified: 2010-08-05
Hello, I am running a windows 2000 printer server and all my clients are on windows 2000 as well.  Can I use active directory to delete all of the client's current printer maps and at the same time, replace the maps with ones I choose.  This would need to be a one time deal as the clients should then be able to add other printers later.  If this is possible, please spell out in detail how I accomplish this (I am very new to active directory).  Thanks!
Question by:sgolemon
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

Expert Comment

ID: 8113817
yes. but you can't do that using the active directory.  You'll need a script to do this.  Here's what you do:

In the top level OU in which you have all your departments you set a group policy to use a login script (if you don't konw how to do this, just send a follow-up question).  The script should be something like this:

-----Start pasting after this line-----
'Next sentence catches errors, in case your script fails you don't want to give your users an error

On Error Resume Next
'Add FRONT Printer
PrinterPath = "\\MyServer\FrontPrinter"
PrinterDriver = "Name of Print Driver"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver    
PrinterPath = "\\MyServer\BackPrinter"
PrinterDriver = "Name of this Print Driver"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

'Set default printer
WshNetwork.SetDefaultPrinter "\\MyServer\FrontPrinter"      

-----Stop Pasting before this line-----

Now, this won't delete your user's current printer shares, but you can take a look at the WSH reference at


on how to do this (it's somewhere in the primer I think, basically, you'll need to enumerate the pritner shares on the machine and disconnect them).

Also, keep in mind taht in the script, the Printer driver name must be entered EXACTLY as typed in your printer settings, you can find the name of the driver by right clicking on the printer going to Properties and then under the Advanced Tab.

Hope this helps.


Author Comment

ID: 8115391
I must be doing something wrong.  The script isn't mapping the printer.  When I try to manually run the script at a cmd prompt I recieve "unrecognized command" errors.  I should be saving this script as a .bat right?

Expert Comment

ID: 8119589
should be a .vbs

also to run it you need to use the cscript command
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.


Expert Comment

ID: 8401767
Write me directly. I have a program to do this for you.

Expert Comment

ID: 9153173
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Accepted Solution

SpazMODic earned 0 total points
ID: 9846337
PAQed, with points refunded (100)

EE Moderator

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

764 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