How do I pass the password to a net use command without being prompted?
up vote
1
down vote
favorite
I need to map a drive without being prompted for the password. I am trying to use net use and putting the password inline within the command. I get an error.
net use H: \MYSERVERMYFOLDERSBackup /user:ABCCompanyJoeUser oasddkjkla
I get the following error: 'sddkj' is not recognized as an internal or external command. If it's not obvious, it's a part of the password that I entered.
The command works fine if I remove the password and enter it upon the dialog box. I'm using Windows 10. Is it still acceptable to pass the password right after the username?
command-line passwords
add a comment |
up vote
1
down vote
favorite
I need to map a drive without being prompted for the password. I am trying to use net use and putting the password inline within the command. I get an error.
net use H: \MYSERVERMYFOLDERSBackup /user:ABCCompanyJoeUser oasddkjkla
I get the following error: 'sddkj' is not recognized as an internal or external command. If it's not obvious, it's a part of the password that I entered.
The command works fine if I remove the password and enter it upon the dialog box. I'm using Windows 10. Is it still acceptable to pass the password right after the username?
command-line passwords
1
The command above looks correct to me. when writing your batch file, what program did you use?
– Stese
May 14 at 14:54
As I read the documentation, the password should follow the network share address.
– AFH
May 14 at 15:34
@Stese I used both the command window and a SQL Server cmd call. Both returned the same error.
– Bill Greer
May 14 at 16:13
@AFH Can you point me to the documentation you read?
– Bill Greer
May 14 at 16:14
Typenet use /?
. or look here.
– AFH
May 14 at 17:04
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I need to map a drive without being prompted for the password. I am trying to use net use and putting the password inline within the command. I get an error.
net use H: \MYSERVERMYFOLDERSBackup /user:ABCCompanyJoeUser oasddkjkla
I get the following error: 'sddkj' is not recognized as an internal or external command. If it's not obvious, it's a part of the password that I entered.
The command works fine if I remove the password and enter it upon the dialog box. I'm using Windows 10. Is it still acceptable to pass the password right after the username?
command-line passwords
I need to map a drive without being prompted for the password. I am trying to use net use and putting the password inline within the command. I get an error.
net use H: \MYSERVERMYFOLDERSBackup /user:ABCCompanyJoeUser oasddkjkla
I get the following error: 'sddkj' is not recognized as an internal or external command. If it's not obvious, it's a part of the password that I entered.
The command works fine if I remove the password and enter it upon the dialog box. I'm using Windows 10. Is it still acceptable to pass the password right after the username?
command-line passwords
command-line passwords
asked May 14 at 14:44
Bill Greer
10816
10816
1
The command above looks correct to me. when writing your batch file, what program did you use?
– Stese
May 14 at 14:54
As I read the documentation, the password should follow the network share address.
– AFH
May 14 at 15:34
@Stese I used both the command window and a SQL Server cmd call. Both returned the same error.
– Bill Greer
May 14 at 16:13
@AFH Can you point me to the documentation you read?
– Bill Greer
May 14 at 16:14
Typenet use /?
. or look here.
– AFH
May 14 at 17:04
add a comment |
1
The command above looks correct to me. when writing your batch file, what program did you use?
– Stese
May 14 at 14:54
As I read the documentation, the password should follow the network share address.
– AFH
May 14 at 15:34
@Stese I used both the command window and a SQL Server cmd call. Both returned the same error.
– Bill Greer
May 14 at 16:13
@AFH Can you point me to the documentation you read?
– Bill Greer
May 14 at 16:14
Typenet use /?
. or look here.
– AFH
May 14 at 17:04
1
1
The command above looks correct to me. when writing your batch file, what program did you use?
– Stese
May 14 at 14:54
The command above looks correct to me. when writing your batch file, what program did you use?
– Stese
May 14 at 14:54
As I read the documentation, the password should follow the network share address.
– AFH
May 14 at 15:34
As I read the documentation, the password should follow the network share address.
– AFH
May 14 at 15:34
@Stese I used both the command window and a SQL Server cmd call. Both returned the same error.
– Bill Greer
May 14 at 16:13
@Stese I used both the command window and a SQL Server cmd call. Both returned the same error.
– Bill Greer
May 14 at 16:13
@AFH Can you point me to the documentation you read?
– Bill Greer
May 14 at 16:14
@AFH Can you point me to the documentation you read?
– Bill Greer
May 14 at 16:14
Type
net use /?
. or look here.– AFH
May 14 at 17:04
Type
net use /?
. or look here.– AFH
May 14 at 17:04
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Please try using:
net use H: \MYSERVERMYFOLDERSBackup oasddkjkla /user:ABCCompanyJoeUser
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Please try using:
net use H: \MYSERVERMYFOLDERSBackup oasddkjkla /user:ABCCompanyJoeUser
add a comment |
up vote
2
down vote
accepted
Please try using:
net use H: \MYSERVERMYFOLDERSBackup oasddkjkla /user:ABCCompanyJoeUser
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Please try using:
net use H: \MYSERVERMYFOLDERSBackup oasddkjkla /user:ABCCompanyJoeUser
Please try using:
net use H: \MYSERVERMYFOLDERSBackup oasddkjkla /user:ABCCompanyJoeUser
edited Dec 3 at 15:45
mwfearnley
4,76431624
4,76431624
answered May 16 at 19:31
David Rossi
361
361
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1322563%2fhow-do-i-pass-the-password-to-a-net-use-command-without-being-prompted%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The command above looks correct to me. when writing your batch file, what program did you use?
– Stese
May 14 at 14:54
As I read the documentation, the password should follow the network share address.
– AFH
May 14 at 15:34
@Stese I used both the command window and a SQL Server cmd call. Both returned the same error.
– Bill Greer
May 14 at 16:13
@AFH Can you point me to the documentation you read?
– Bill Greer
May 14 at 16:14
Type
net use /?
. or look here.– AFH
May 14 at 17:04