Word – How to pass the password to a net use command without being prompted

command linepasswords

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: \\MYSERVER\MYFOLDERS\Backup /user:ABCCompany\JoeUser 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?

Best Answer

Please try using:

net use H: \\MYSERVER\MYFOLDERS\Backup oasddkjkla /user:ABCCompany\JoeUser 
Related Question