Authenticate to a Domain using VBScript
I'm trying to find some example code on how to authenticate to a server, or domain using VBScripting. Does anyone have any sample code they could donate? Thanks
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
Aaron
20 years ago
Posted by:
lldan
20 years ago
Actually this is going to be for a file copy function. I need to authenticate to \\server\shared prior to the file copy. I can do this with a batch file, but I want to get away from those and start using vbscripting. This is going to be done using a GPO login script (machine). Hope this info is a little more clear. Thanks for the response.
Posted by:
TMAC
20 years ago
Here's a simple script I wrote for a user to connect and it set's the drive letter at W:
'***********Start Script*****
Fulluser="Tom"
PWD="password"
Set objNetwork = Wscript.CreateObject("Wscript.Network")
Objnetwork.mapnetworkdrive "W:", "\\lsp7srv1\wanshare$",, Fulluser, PWD
'***********End Script*****
Hope it helps.
'***********Start Script*****
Fulluser="Tom"
PWD="password"
Set objNetwork = Wscript.CreateObject("Wscript.Network")
Objnetwork.mapnetworkdrive "W:", "\\lsp7srv1\wanshare$",, Fulluser, PWD
'***********End Script*****
Hope it helps.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.