There are several task on the IT world that may be quite simple to execute but, imagine you provide service for a large organization and where there 50 different printers across the building and your IT director wants you to configure those printers per floor to specific users... How do you do this? Would you go one by one and set each user's computer manually or will you create a script to ease your life?
Scripting does not just makes it easier to implement but also to make changes that without the script would take lots of hours and manpower...
The following lines contain the script that could accomplish this:
'Created by Tips4teks.blogspot.com
'each line next to the quote won't be ran when you execute the script since it's just a comment.
'The command wscript.echo is used to generate a dialog box with the message of quotes
WScript.Echo "This script maps network printers"
'here you declare your variables
Option Explicit
Dim objNetwork, objPrinter, strUNCPrinter0, strUNCPrinter1, strUNCPrinter2, strUNCPrinter3, strUNCPrinter4, strUNCPrinter5
'These variables contain the server name UNC path of the network printer.
strUNCPrinter0 = "\\server-name\BusinessColor2"
strUNCPrinter1 = "\\server-name\CreativeColor2"
strUNCPrinter2 = "\\server-name\SapPrint2"
strUNCPrinter3 = "\\server-name\BusinessColor1"
strUNCPrinter4 = "\\server-name\CreativeColor1"
strUNCPrinter5 = "\\server-name\SapPrint1"
Set objNetwork = CreateObject("WScript.Network")
'Each one of these lines will map the printer
objNetwork.AddWindowsPrinterConnection strUNCPrinter0
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
objNetwork.AddWindowsPrinterConnection strUNCPrinter3
objNetwork.AddWindowsPrinterConnection strUNCPrinter4
objNetwork.AddWindowsPrinterConnection strUNCPrinter5
'The next lines will set a printer as default.
Set objPrinter = CreateObject("WScript.Network")
objPrinter.SetDefaultPrinter strUNCPrinter0
WScript.Echo "Printers were successfully mapped."
WScript.Quit
Scripting does not just makes it easier to implement but also to make changes that without the script would take lots of hours and manpower...
The following lines contain the script that could accomplish this:
'Created by Tips4teks.blogspot.com
'each line next to the quote won't be ran when you execute the script since it's just a comment.
'The command wscript.echo is used to generate a dialog box with the message of quotes
WScript.Echo "This script maps network printers"
'here you declare your variables
Option Explicit
Dim objNetwork, objPrinter, strUNCPrinter0, strUNCPrinter1, strUNCPrinter2, strUNCPrinter3, strUNCPrinter4, strUNCPrinter5
'These variables contain the server name UNC path of the network printer.
strUNCPrinter0 = "\\server-name\BusinessColor2"
strUNCPrinter1 = "\\server-name\CreativeColor2"
strUNCPrinter2 = "\\server-name\SapPrint2"
strUNCPrinter3 = "\\server-name\BusinessColor1"
strUNCPrinter4 = "\\server-name\CreativeColor1"
strUNCPrinter5 = "\\server-name\SapPrint1"
Set objNetwork = CreateObject("WScript.Network")
'Each one of these lines will map the printer
objNetwork.AddWindowsPrinterConnection strUNCPrinter0
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
objNetwork.AddWindowsPrinterConnection strUNCPrinter3
objNetwork.AddWindowsPrinterConnection strUNCPrinter4
objNetwork.AddWindowsPrinterConnection strUNCPrinter5
'The next lines will set a printer as default.
Set objPrinter = CreateObject("WScript.Network")
objPrinter.SetDefaultPrinter strUNCPrinter0
WScript.Echo "Printers were successfully mapped."
WScript.Quit
Now you got the code but, what do you do with it? Simply copy it as is and paste it on your preferred text editor and save it with extension type "vbs" (ex. map-printers.vbs). Open the script once saved and kaboon shazaam, you got it!
The best selection of, thank you for work you have done. Your whole text is very useful. Also visit the HP Printer Helpline Number for getting more info about it.
ReplyDeleteHigh DA Free Bookmarking Site List For 2019
ReplyDeleteFree Blog Creation Site List 2019
High DA Free Web.2.0 Site List For 2019
High DA Free Classified Site List For 2019
High DA Free Directory Submission Site List 2019
High DA Free Article Submission Sites List 2019
High DA , PA Do Follow Free Forum Site List 2019
This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. renting impresoras murcia
ReplyDelete