I have a need to have a network drive mounted and available on a Windows 10 machine to a specific user automatically after the machine has booted up. This user will have services running, and these services need access to the network drive.

How do I do that?

(Notes: I am not looking to mount the drive on login, but on bootup so that the drive is available to services. The drive mount must happen unattended, there is no user around to manually enter credentials)

The closest I've got is to mount the drive as follows:

net use h: https://server.example.com/storage /savecred /persistent:yes

The drive mounts successfully after asking for a username and password and gives the option to remember the credentials, however on reboot and subsequent login the drive is listed but not mounted, and I am asked to provide the password, which seems to show that /savecred isn't doing anything.

1 Answer 1


Unsure why CLI isn't saving the credential, but it can be manually added via the GUI:

  1. Once user logs in, open up This PC
  2. Right-click on background, select Add a network location
  3. Press Next twice, then Choose a custom network location
  4. Enter share name (i.e. \\Server\share\name), then Next
    • Credentials will be asked for, and once accepted, will be saved in Credential Manager
      Control Panel\User Accounts\Credential Manager
  5. Name the share, Next, then Finish

On Pro/Enterprise editions, it may be required to Enable the following Group Policy:

  • Computer Configuration\Administrative Templates\System\Logon:
    Always wait for the network at computer startup and logon

This can also be accomplished via Group Policy [gpedit.msc] on Pro & Enterprise versions of Win10:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.