nootgevallen
Technical User
I have printer groups in windows 2003
My workstation is added to the group Print-Systeembeheer
But my workstation gets printers vg01 and vg02 and i am not in that group! ??
Can someone see what i do wrong.
script :
Const Systeembeheer = "cn=Print-Systeembeheer"
Const Vastgoed = "cn=print-vastgoed"
Set wshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, Systeembeheer_GROUP) Then
wshNetwork.AddWindowsPrinterConnection "\\SRV-EXCHANGE-1\VG01"
wshNetwork.AddWindowsPrinterConnection "\\SRV-EXCHANGE-1\VG02"
wshNetWork.SetDefaultPrinter "\\SRV-EXCHANGE-1\VG02"
ElseIf InStr(strGroups, Vastgoed) Then
wshNetwork.AddWindowsPrinterConnection "\\SRV-EXCHANGE-1\VG02"
wshNetWork.SetDefaultPrinter "\\SRV-EXCHANGE-1\VG02"
End If
My workstation is added to the group Print-Systeembeheer
But my workstation gets printers vg01 and vg02 and i am not in that group! ??
Can someone see what i do wrong.
script :
Const Systeembeheer = "cn=Print-Systeembeheer"
Const Vastgoed = "cn=print-vastgoed"
Set wshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, Systeembeheer_GROUP) Then
wshNetwork.AddWindowsPrinterConnection "\\SRV-EXCHANGE-1\VG01"
wshNetwork.AddWindowsPrinterConnection "\\SRV-EXCHANGE-1\VG02"
wshNetWork.SetDefaultPrinter "\\SRV-EXCHANGE-1\VG02"
ElseIf InStr(strGroups, Vastgoed) Then
wshNetwork.AddWindowsPrinterConnection "\\SRV-EXCHANGE-1\VG02"
wshNetWork.SetDefaultPrinter "\\SRV-EXCHANGE-1\VG02"
End If