Forum Discussion

Haneef Ibn Ahmad's avatar
Haneef Ibn Ahmad
Iron Contributor
Feb 10, 2018

Connect to Sharepoint Online usin CMD/'net use'/'Add a network location' (without Internet explorer)

Hi,

 

I would like to be able to add Sharepoint Online (SPO) locations to my computer and users's computers by simply using the 'net use' command in command prompt or 'Add a network location' in Windows Explorer without having to go on Internet Explorer (IE).

 

How can this be done? 

 

I understand that they'll have to enter their username and password in a 'Windows Security' prompt, like below:

 

 

 

 

 

 

 

 

 

 

 

 

Thanks,

 

Notes:

Cannot use IE as:

  1. Internet Explorer is no longer supported and has issues with crashing.
  2. Need to add multiple network locations in different SPO tenants.

Want to use CMD/'net use'/'Add a network location' as:

  1. it is easier for the users
  2. Can give them a batch file (.bat) or
  3. ask them to follow GUI prompts in Windows explorer.

 

 

5 Replies

  • Dean_Gross's avatar
    Dean_Gross
    Silver Contributor

    One of the primary issues with Mapped drives and SP Online is that with a SharePoint Online mapped drive on Windows 7, the mapped drive will not stay connected if the computer is restarted or you sign out.

     

    The above is from https://support.microsoft.com/en-us/help/2616712/how-to-configure-and-to-troubleshoot-mapped-network-drives-that-connec

     

    In general, attempting to map a drive to SharePoint Online is not reliable and can cause numerous support tickets. Showing users how to Sync a desired document library is the recommended approach

    • Yarro78's avatar
      Yarro78
      Copper Contributor

      Dean_Gross , Hello mr Dean, please reply to initial question "how to connect Sharepoint via CMD".. and stop telling why it is not good idea! ... because of "after reboot"  i have to connect it manually.

       

      it is still better to always do "reconnect" as don't have it at all... YOU KNOW ?

       

      So, please, be so kind and add screen, or link to screen where list of commands expected are listed (and example address) which will answer initial question.

       

      Thank very much in advance

      PS. if you don't want to receive ticket from users about issues concerned, just ignore it for some time :D, but stop blocking users 😉 

      • E_van_Heerden's avatar
        E_van_Heerden
        Copper Contributor

        I have found this to work:

         

        net use h: "\\mysites.domain\personal\user\Personal Documents" /u:username password

         

        Note:  You have to use "  (Quotes) for the path as there is a space which will be misinterpreted otherwise in the path.

        Note: The original path on Edge was:

        http://mysites.domain/personal/user/Personal%20Documents/Forms/AllItems.aspx

        So the http:// was dropped and all forward slashes were changed to back slashes and then everything after Documents were dropped as well.

         

        Another example, but to a server drive, and in this case a persistent mapping is specified

        net use s: \\server\e$ /u:user password /persistent:Yes

         

        NB: Sometimes windows complains that a drive letter is already in use, so I use this in my bat file before I execute the above mappings:

        net use h: /delete

    • Haneef Ibn Ahmad's avatar
      Haneef Ibn Ahmad
      Iron Contributor

      Thanks for the reply.

       

      I've seen that support article before.

       

      The issue is that it requires the user to be logged into Internet Explorer first.

       

      I would like to know if there are any options to allow the user to login using WebDAV or 'Add a network location' in Windows or Mac, without using Internet Explorer.

       

      Using the sync client to sync various locations on SPO with different logins is a bit of an issue. Where as, 'Add a network location' is a quick and easy way of browsing SPO items and disconnecting when done.

      • Sandro Clz's avatar
        Sandro Clz
        Copper Contributor

        Any update on this? Having the same problem...

Resources