Mapping a network drive and having trouble saving password

前端 未结 2 1067
孤独总比滥情好
孤独总比滥情好 2021-02-13 13:10

I\'m running a batch:

\"net use j: \\\\192.168.1.241\\sausb /user:srvfeskar\\administrator Ratata12 /persistent:yes /p:yes\"

After restarting t

2条回答
  •  再見小時候
    2021-02-13 14:12

    If i understand it, you are not running the same command each time after restart. You want to run the command once and then in sucessive logins have the drive mapped without having to validate.

    There are two options

    • In net use j: command include the /persistent:yes and /savecred switches, but do not include user or password data. It will be asked and then saved for later use.

    • Use the cmdkey command to store the required credentials in the machine.

      cmdkey /add:191.168.1.241 /user:srvfeskar\administrator /pass:Ratata12

      Then when net use j: \\192.168.1.241\sausb /persistent:yes is used, the credentials stored will be used for the mapping.

提交回复
热议问题