Pass user credentials in vbscript

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.
Who is Participating?
Rafal_MituraAuthor Commented:
I found answer in here:

user will be queried for logon details and stored as variable in ram until script is terminated (finish running).
Thanks for your help.
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
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?
Robberbaron (robr)Commented:
in vbs, you can ask for the list of usernames and passwords via InputBox.

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 !)
Rafal_MituraAuthor Commented:
answer identified elsewhere on forum
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.