Reputation: 113
I wanted to connect to a shared folder with user name and a password. After the connection is successful copy files to destination folder.
I know using "net use" command a shared folder can be mapped to a drive and after that I can use, I do not wanted to do that.
I am doing this to create a script to deployment a dotnet web application.
Any kind of help is highly appreciated.
Note: powershell is not available in that server.
Thanks
Upvotes: 0
Views: 3937
Reputation: 4511
Use net use z: \\<network-location>\<some-share>\ password /USER:username
first and then net /d z:
to clean up, if your primary concern is not to leave unnecessary shares. Unfortunately, you cannot include your credentials in any other standard CLI command.
Upvotes: 2