rss

Retired Scripts: Map Default Printers

Okay, It's been done before a hundred different ways, and if you have group policy and a new AD schema at your disposal, it's probably just a bad idea.

mapdefprinters.wsf

<job>
    <script language="VBScript">
'******************************************************************************
'* Map all printers script (all default printers)
'* 
'* Modified: 2:55 PM 9/2/2003 -j. bilinski
'******************************************************************************
On Error Resume Next
strComputer = "."
Set wshNetwork = CreateObject("WScript.Network")
 
'*** Add default printers to array ***
arrPrinters = Array(_
"\\domain.tld\printer01",_
"\\domain.tld\printer02",_
"\\server001\printer03",_
"\\server001\printer04",_
"\\server002\printer05",_
"\\server002\printer06"_
)
 
 
For i = 0 To UBound(arrPrinters)
wshNetwork.AddWindowsPrinterConnection arrPrinters(i)
Next
 
Wscript.Quit    
    </script>
</job>

 

More Script Dump...

Bookmark


TrackBack URL: http://bilinski.org/trackback.ashx?id=26


Leave a Comment

 

 (optional/private)

(optional/public)