Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Active Directory and Printer Mapping.

Posted on 2003-03-10
6
Medium Priority
?
743 Views
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!
0
Comment
Question by:sgolemon
6 Comments
 

Expert Comment

by:aelhajj
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    
   
'ADD BACK LANIER
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

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/scrguide/sas_wsh_qlcc.asp

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.

0
 

Author Comment

by:sgolemon
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?
0
 

Expert Comment

by:aelhajj
ID: 8119589
should be a .vbs

also to run it you need to use the cscript command
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 1

Expert Comment

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

Expert Comment

by:CleanupPing
ID: 9153173
sgolemon:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 

Accepted Solution

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

SpazMODic
EE Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this article I will be showing you how to subnet the easiest way possible for IPv4 (Internet Protocol version 4). This article does not cover IPv6. Keep in mind that subnetting requires lots of practice and time.
Sometimes it necessary to set special permissions on user objects.  For instance when using a Blackberry server, the SendAs permission needs to be set. I see many admins struggle with the setting that permission only to see it disappear within a few…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

571 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