Pass user credentials in vbscript

hello,
I have vbs script that:
-reads csv files with filepath and filename,
-copies the files to my archive storage
-adds entry for filename "copy start" (timestamp), "copy end" (timestamp) the log file,
and repeats the task for each entry in the csv.
It can take up to 3 days to copy all my files across.

source backups files are stored at multiple servers that are stand alone (not members of AD)  local username/password is requires.

I don't want to hard code logon credentials in my script. how do I:
1 capture logon credentials as variable for each source server
2 authenticate to source server to copy source files.
Rafal_MituraAsked:
Who is Participating?
 
Rafal_MituraAuthor Commented:
I found answer in here:
https://www.experts-exchange.com/questions/22676274/VBScript-authentication-to-remote-PC-and-file-copy.html

user will be queried for logon details and stored as variable in ram until script is terminated (finish running).
Thanks for your help.
0
 
Robberbaron (robr)Commented:
you either have to ask for each and every one when starting the script (which defeats much of usefulness of scripting) or store them in a text file in some encrypted format.

not great security but at least someone will need your script that decrypts as well as the encrypted list
0
 
Rafal_MituraAuthor Commented:
I need equivalent of powershell "get-credental" and store it as variable natively in vbs
or call powershell from vbs to do get-credental
or rewrite entire logic in powershell natively (trying to avoid it).

what would you suggest?
0
 
Robberbaron (robr)Commented:
in vbs, you can ask for the list of usernames and passwords via InputBox. http://www.robvanderwoude.com/vbstech_ui_userinput.php

but using it as a learning excercise for powershell is probably worthwhile as that is the future.  (im too old to learn PS too much now !)
0
 
Rafal_MituraAuthor Commented:
answer identified elsewhere on forum
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.