OneDriveMapper automatically map your OneDrive for Business upon login

This script maps your Onedrive / Sharepoint / Teams document libraries to driveletters (or shortcuts). It can be used in any environment (VDI, RemoteApp, w10 etc).

 
 
 
 
 
4.6 Star
(113)
67,173 times
Add to favorites
Office 365
2/3/2019
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • script stuck here
    1 Posts | Last post November 20, 2019
    • 
      11/20/2019 17:01:29 | INFO | Retrieving Sharepoint cookie step 2 at https://XXXXXX-my.sharepoint.com/_forms/default.aspx
      11/20/2019 17:01:37 | INFO | Waited for 0 seconds for O4b auto provisioning...
      11/20/2019 17:01:49 | INFO | Waited for 10 seconds for O4b auto provisioning...
  • Works on Windows 2012R2
    1 Posts | Last post July 03, 2019
    • Less a question, than an update.  I was able to successfully run this script on a Windows 2012R2 server.
  • Getting error 1790 on Windows Server 2008 R2(Windows 6) machine
    1 Posts | Last post June 14, 2019
    • We are testing the script on Windows Server 2008 R2(Windows 6) and received the error 1790 and unable to map the OneDrive with the local drive,  have enabled & configured WebDAV from the feature option and but still no luck.
      
      Any idea?
  • Subfolder Permissions not "honored"
    2 Posts | Last post May 24, 2019
    • I have been using ODM to map the default "Documents" library off the default Sharepoint site in Office 365.  Under the Documents folder, I create sub folders.  On those sub folders, I set various permissions.  Mostly, I only grant certain users rights to certain folders.  If you login at Sharepoint Online, you get what you expect.  Users with rights to only a few folders see *only* those few folders.  Admins with rights to all folder see all folders.  Yes, I disable inheritance.  From the web portal, everything works as expected.
      
      Enter mapping a drive with ODM.  ALL USERS have access to ALL FOLDERS - including sub folders and files of sub folders.  I've rebuilt permissions several times on folders, and even waited days for "propagation" of those changes.  No change.  I have "pushed" the changes down on sub folders.  I have double checked there are *no* groups and *no* default permissions on my sub folders.  
      
      Microsoft support says they don't support ODM and won't troubleshoot the issue.
      
      Any ideas?
      
      
      
      
    • I would recommend not mentioning ODM to support, but simply stating the issue is with WebDAV (which is the truth). I haven't seen this issue / can't reproduce it btw, if webdav would ignore permissions this would be a HUGE security issue and escalated big time.
  • I am getting this error message and failed after numerous attempts....
    2 Posts | Last post April 29, 2019
    • WARNING | Failed to force sign in persistence
      INFO | Retrieved user password from cache C:\Users\*****\AppData\Roaming\OneDriveMapper.tmp
      ERROR | Failed to find the correct controls at https://login.microsoftonline.com/login.srf?msafed=0 to log in by script,
      check your browser and proxy settings or check for an update of this script (2). The element ***_****_com was not found (2) or had no tagName
      INFO | IE login function succeeded
      Exception calling "Navigate" with "1" argument(s): "The requested resource is in use. (Exception from HRESULT: 0x800700AA)"
      At C:\temp\OneDriveMapper.ps1:3365 char:24
      +     $script:ie.navigate <<<< ($baseURL)
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ComMethodTargetInvocation
      
      After numerous attempts, it just gave me "Mapping cannot continue because we cannot detect your username.".
    • Hello Eric/ All,
      
      Im getting the same error message and failing. Anyone got any solution for tis issue?
      
      Thank you,
      Gopi
  • Error Detected string error 224
    2 Posts | Last post April 29, 2019
    • We are using windows 10 with the 3.20 login script but we keep getting the below error, it works if sharepoint is open in IE.  The trusted sites are added and I have tried resetting IE but still get the error on the next reboot
      
      ERROR: detected string error 224 in return code of net use command, this usually means your trusted sites are misconfigured or KB2846960 is missing or Internet Explorer needs a reset.
      Error failed to contact H: after mapping it to \{domain.sharepoint.com@SSLDavWWWRootpersonal{user_domain}Documents
       , check if the URL is valid.
      System error 224 has occurred. 
      Error: Access Denied. Before opening files in this location, you must first add the web site to your trusted sites list, browse to the web site, and select the option to login automatically.
      
      
    • I have got the same error on Windows Server 2016, version 3.18 is working correctly
  • Error
    3 Posts | Last post April 17, 2019
    • I am getting the following error under MFA
      
      ERROR | userLookupMode is set to 3, but the registry path HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WorkplaceJoin\AADNGC does not exist! Using method 2
      ERROR | userLookupMode is set to 3, but the registry path HKCU:\Software\Classes\Local Settings\Software\Microsoft\SettingSyncHost.exe\WinMSIPC does not exist! Using method 3
      ERROR | userLookupMode is set to 3, but the registry path HKLM:\SOFTWARE\Microsoft\IdentityStore\Cache\S-1-5-21-4051172019-4201845401-128855694-279757\IdentityCache\S-1-5-21--4201845401-128855694-279757 does not exist! All lookup modes exhausted, exiting
      
      
      Please help.
    • Having the same issue, any workaround?
    • Please change it to 1 at Line no 28 and retry, please don't forget to change your o365 customer name / domain name @ line no 26.
      
  • iam getting a error like this
    3 Posts | Last post April 17, 2019
    • ERROR | userLookupMode is set to 3, but the registry path HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WorkplaceJoin\AADNGC does not exist! what does it mean
      
    • Okay 
    • Please change it to 1 at Line no 28 and retry, please don't forget to change your o365 customer name / domain name @ line no 26.
  • Two tenants
    2 Posts | Last post April 09, 2019
    • This is working great! But now i need to map two drives, for two different tenants. Any advice how to achieve this with this script? Or any other way? Users are working from a terminal server. 
    • Thats two drives for the same user, the user has two different Office365 users in two tenants.
  • i want to map one common one drive to all user
    1 Posts | Last post March 20, 2019
    • i want to map one common one drive to all user for file sahring...iam struggting alot to do it...please anybody advice..
1 - 10 of 192 Items