Forum Discussion
Connect to Sharepoint Online usin CMD/'net use'/'Add a network location' (without Internet explorer)
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
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_HeerdenJan 31, 2023Copper 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