My company is in the process of setting up a new domain for reasons that would take to long to explain. What i am trying to do is map a users share from the old domain when they login to the new domain. The problem is...usernames are different. I do have a trust setup and i can map the share manually successfully. So there shouldnt be an issue accessing anything.
Heres what i am looking to do, if it is possible.
is there a way to get the "displayName" object from the new domain and use it find a matching "displayName" in the old domain. If the query locates a match then return the username of the old domain account and map a drive in the new domain based on the username with a $ for the share.
something like this:
(i dont know much syntax so its mixed with code and english)
On Error Resume Next
Set objNetwork = WScript.CreateObject("WScript.Network")
User = objNetwork.displayName
Query olddomain to find a displayName match with User
If there is a match
return username from old domain
objNetwork.MapNetworkDrive "X:", "\\server\" & username & "$", True
If Not
End Script
End If
Something like that would be awesome, i hope it can be done.
Thanks,
-drew
Heres what i am looking to do, if it is possible.
is there a way to get the "displayName" object from the new domain and use it find a matching "displayName" in the old domain. If the query locates a match then return the username of the old domain account and map a drive in the new domain based on the username with a $ for the share.
something like this:
(i dont know much syntax so its mixed with code and english)
On Error Resume Next
Set objNetwork = WScript.CreateObject("WScript.Network")
User = objNetwork.displayName
Query olddomain to find a displayName match with User
If there is a match
return username from old domain
objNetwork.MapNetworkDrive "X:", "\\server\" & username & "$", True
If Not
End Script
End If
Something like that would be awesome, i hope it can be done.
Thanks,
-drew