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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

Active Directory Scripts

Im trying to create either a Group/Organization or something to that effect in Active Directory where I can assign a group of printers to these. So in the end I can take this group that I have created and assign the users that will be needing to have access to these printers. Therefore when they logon regardless to where they are the will be assigned to that specific group fo printers. IE like the logon scripts that map the drives for them, but instead the printers so I can do this for various departments.

Can this be done? Im  sure it can but I am struggling at this point to find the answer.
0
halfbinz
Asked:
halfbinz
1 Solution
 
guidwayCommented:
Will something like this work?

http://www.jsifaq.com/SUBF/TIP2700/rh2708.htm

2708 ; How do I map a network printer on Terminal Service?

Terminal Services on Windows 2000 and Windows NT 4.0 can NOT automatically map a network printer. A Printer that is locally attached to a LPT, COM, or USB port can be automatically mapped.

You can map a network printer by using the Windows Scripting Host (WSH) to run a Visual Basic script:

Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\YourServer\YourPrinterShare"
PrinterDriver = "YourPrinterDriver"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter "\\YourServer\YourPrinterShare"

NOTE: YourPrinterDriver must exactly match the driver name in the Ntprint.inf file.

If you wish to add a different printer for each user who logs on to Terminal Services:

Set WshNetwork = CreateObject("WScript.Network")

Select Case WshNetWork.UserName

   Case "Username1"

       PrinterPath = "\\YourServer\YourPrinterShare1"
       PrinterDriver = "YourPrinterDriver1"
       WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
       WshNetwork.SetDefaultPrinter "\\YourServer\YourPrinterShare1"
   
   Case "Username2"

       PrinterPath = "\\YourServer\YourPrinterShare2"
       PrinterDriver = "YourPrinterDriver2"
       WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
       WshNetwork.SetDefaultPrinter "\\YourServer\YourPrinterShare2"
   
End Select
Using a logon script or Group Policy, run the script each time a user logs on to Terminal Services.

guidway
0
 
cempashaCommented:
This question is still open and getting old. If any of the comment(s) above helped you please accept it as an answer or split the points who ever helped you in this question. Your attention in finalising this question is very much appreciated. Thanks in advance,

****** PLEASE DO NOT ACCEPT THIS AS AN ANSWER ********

- If you would like to close this question and have your points refunded, please post a question in community support area on http://www.experts-exchange.com/Community_Support/ giving the address of this question. Thank you      

Pasha

Cleanup Volunteer


0

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now