Hi all,
I implemented this following script on my domain:
ON ERROR RESUME NEXT
Set WSHShell = CreateObject("WScript.Shell")
Set objNet = CreateObject("WScript.Network")
DomainString = "ZSWSDMN"
UserString = objNet.UserName
'Synchronizes PC's With Time Server
WSHShell.Run "NET TIME \\ZSWSDMN01 /set /y"
'All Users Drive Mappings
objNet.MapNetworkDrive "H:", "\\DC\data",True
'Group Membership Drive Mappings
'Check Group Memberships
If IsMember(objUser, "Administrators") Then
objNet.MapNetworkDrive "L:", "\\DC",True
objNet.MapNetworkDrive "M:", "\\DC\Data",True
End If
If IsMember(objUser, "test1") And IsMember(objUser, "Administrators") Then
objNet.MapNetworkDrive "I:", "\\DC\operations",True
End If
wscript.quit.
Result:
There was no mapped drive in "My Computer" of a client marchine when domain users and administrators logs on to domain.
On the contrary, there were mapped drives when domain administrators log on to domain through domain controller.
What I want: How can I edit this script to enable users in test1 group to have mapped drive on their machine when they log on to domain through their computer.
Thank you very much.
Leke
I implemented this following script on my domain:
ON ERROR RESUME NEXT
Set WSHShell = CreateObject("WScript.Shell")
Set objNet = CreateObject("WScript.Network")
DomainString = "ZSWSDMN"
UserString = objNet.UserName
'Synchronizes PC's With Time Server
WSHShell.Run "NET TIME \\ZSWSDMN01 /set /y"
'All Users Drive Mappings
objNet.MapNetworkDrive "H:", "\\DC\data",True
'Group Membership Drive Mappings
'Check Group Memberships
If IsMember(objUser, "Administrators") Then
objNet.MapNetworkDrive "L:", "\\DC",True
objNet.MapNetworkDrive "M:", "\\DC\Data",True
End If
If IsMember(objUser, "test1") And IsMember(objUser, "Administrators") Then
objNet.MapNetworkDrive "I:", "\\DC\operations",True
End If
wscript.quit.
Result:
There was no mapped drive in "My Computer" of a client marchine when domain users and administrators logs on to domain.
On the contrary, there were mapped drives when domain administrators log on to domain through domain controller.
What I want: How can I edit this script to enable users in test1 group to have mapped drive on their machine when they log on to domain through their computer.
Thank you very much.
Leke