This script will install network printers for users that are a member of a specified security group. You can run this from the user's login script.
'http://vbsbob.blogspot.com/
Dim shellobj, netobj, username, adsobj
On Error Resume Next
Set shellobj = WScript.CreateObject("WScript.Shell")
Set netobj = WScript.CreateObject("WScript.Network")
While username = ""
username = netobj.UserName
Wend
adsPath = "WinNT://Active Directory Domain Name/" & username
Set adsobj = GetObject(adsPath)
For Each Prop IN adsobj.Groups
Select Case Prop.Name
Case "security group"
netobj.AddWindowsPrinterConnection "\\server name\printer share name"
Sunday, January 6, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. renting impresoras sevilla
Post a Comment