/build/static/layout/Breadcrumb_cap_w.png

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)

Posted by: Aaron 20 years ago
Senior Yellow Belt
0
You will need to use ADSI for this, but first I have a question. Is the authentication being done from a web application like an ASP page?
Posted by: lldan 20 years ago
Senior Yellow Belt
0
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
Yellow Belt
0
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ