Link to home
Start Free TrialLog in
Avatar of abendv_10
abendv_10

asked on

Logon Script base on vbscript

Hello,
I am new in vb script.
I have a Terminal Servers farm and pc stations which logon to a windows 2003 Domain.
I like to check group membership and map drives to home directories.
I try to run a script which map only the members of "ts2003" to home directory.
I get the Error: Type Mismatch: 'isMember' code: 800A000D.

the script is..

'on error resume next
Dim WshNetwork, strUserName
Set WshNetwork = CreateObject("Wscript.Network")
strUserName = WshNetwork.UserName
if isMember(WshNetwork.username, "ts2003") Then
WshNetwork.MapNetworkDrive "m:","\\Server1\Users\" & strUserName
End if
Wscript.quit


Thank you.
A.B
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial