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
(116)
75,529 times
Add to favorites
Office 365
2/3/2019
E-mail Twitter del.icio.us Digg Facebook
  • No longer works
    3 Posts | Last post December 02, 2017
    • 3.12 worked for few days, now gives:
      Unable to find user realm due to Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (400) Bad Request."
    • And again, update to 3.13 made it work!
      Thank you Jos
    • hi,
      I have the same issue. From where I can download version 3.13?
  • Please help.
    1 Posts | Last post November 30, 2017
    • Could you please help me? I downloaded your script and attempted to run it after I set all of the variables such as drive letter, customer tenant name etc, but every time I attempt to run it, it never prompts me for username and password, but rather just fails with an error message of Mapping can not continue because we could not log into office 365. It finds my UPN correctly, and even lists it in the powershell using user@domain.com for login etc, however, never prompts me for a password. what am I doing wrong?
      
  • v2.22 and v3.10 not working
    2 Posts | Last post November 21, 2017
    • We don't have ADFS, before using v2.22 working very well over one year. Since last Friday, suddenly don't work, no login windows popup. Does Microsoft OneDrive change something in their backend?
      11/17/2017 16:08:27 | ERROR | ERROR: WebDav File Locking support is enabled, this could cause files to become locked in your OneDrive or Sharepoint site
      11/17/2017 16:08:27 | WARNING | Maximum file upload size is set to 48 MB
      11/17/2017 16:08:27 | INFO | Adding to mapping list: K: (\\domain-my.sharepoint.com@SSL\DavWWWRoot\personal\)
      11/17/2017 16:08:27 | INFO | K: is not yet mapped
      11/17/2017 16:08:27 | INFO | Base URL: https://domain-my.sharepoint.com/_layouts/15/MySite.aspx?MySiteRedirect=AllDocuments 
      11/17/2017 16:08:36 | ERROR | Failed to find signin element type 3 at https://login.microsoftonline.com/login.srf?msafed=0. You may have to upgrade to a later Powershell version or Install Office. Attempting to log in anyway, this will likely fail. Error details: The element cred_keep_me_signed_in_checkbox was not found (2) or had no tagName
      11/17/2017 16:08:36 | INFO | Will use maverick.luk@domain.com as login
      11/17/2017 16:08:36 | INFO | attempting to trigger a redirect to SSO Provider using method 1
      11/17/2017 16:08:36 | 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. The element cred_keep_me_signed_in_checkbox was not found (2) or had no tagName
      11/17/2017 16:08:36 | ERROR | fallback mode is enabled, and login failed. Attempting native auth mode...
    • Used v3.12 some users work fine. But Some users fail mount one drive.
      Log:
      11/21/2017 15:34:31 | WARNING | no KMSI prompt even though we expected one
      I guess it is due to can’t Keep Me Sign In. Microsoft changed to new sign in method. Problem users login in browser, no KMSI windows popup.
      Do you know how to fix it?
  • Works when it wants
    4 Posts | Last post November 17, 2017
    • Worked for weeks, now I get:
      INFO | Failed to find signin element type new method on Office 365 login page, trying next method. Error details: The element uxOptOutLink was not found (2) or had no tagName
      
      INFO | attempting to trigger a redirect to SSO Provider using method 1
      
      INFO | waited for more than 10 to get redirected by SSO provider, attempting normal signin
      
      ERROR: detected string error 224 in return code of net use command, this usually means your trusted sites are misconfigured or KB2846960 is missing
      
      ERROR | failed to contact O: after mapping it to \\.......
    • I just started getting this today as well. More so the "Failed to find signin element..." and "Failed to find the correct controls at "https:\\login.microsoftonline.com/login.srf?msafed=0". I also noticed that we started to default to the "new sign-in experience" today. I'm thinking that maybe that has something to do with it? If I come across anything concrete, I will update here.
    • New version (3.12) worked for me: https://gitlab.com/Lieben/OnedriveMapper_V3/tree/master
      
      Even though some of the stuff says 3.11, the actual script file is 3.12.
    • Yes, 3.12 was the answer!
  • Excellent script!
    4 Posts | Last post November 17, 2017
    • This works very well for us, thanks alot!
      We do have a minor issue in our published-application Citrix environment though. If users start the "My documents" published application before anything else, the logonscript (Onedrivemapper) maps Onedrive a few seconds after Explorer has started. The result is that the drive is mapped, but the users do not see it unless they refresh the window by clicking F5.
      If we use RestartExplorer=$true, the explorer window is terminated, but never shows up again. I'm guessing this is because it is a published application.
      
      What would be good, is if the script did a programmatic refresh of Explorer instead of kill and restart. Does anyone have any ideas?
    • Hi Ola,
      
      You mentioned that you implemented this in your Citrix environment. We also have a Citrix environment and want to start using OneDrive for Business. I just wanted to to know how you're pushing the script out i.e. group policy or Citrix group policy and does it ask for credentials or does it automatically sign them in? 
      
      Thanks for any help on this. 
    • Hello. We have a user-GPO that starts the script on Logon for every user. In addition we have some Webdav Webclient registry-settings as a Machine-GPO to increase filesizes, transfersettings and such.
      In our environment it's 100% silent mapping, no input for user.
      The only thing is that the script is slower than Explorer.exe, so the user don't see the drive unless he/she hits F5.
    • If you don't see the drive until you hit F5, I think there's a setting\variable in the script to change to fix that.
  • Error running version 3.11
    1 Posts | Last post November 02, 2017
    • ERROR | ERROR: WebDav File Locking support is enabled, this could cause files to become locked in your OneDrive or Sharepoint
       site
      
      Method invocation failed because [System.Int32] does not contain a method named 'IndexOf'.
      At C:\temp\OneDriveMapper.ps1:1856 char:16
      +             if($nextURL.IndexOf("https:") -eq -1){
      +                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
          + FullyQualifiedErrorId : MethodNotFound
       
      Exception calling "Create" with "1" argument(s): "Invalid URI. The format of the uri could not be determined"
      At C:\temp\OneDriveMapper.ps1:331 char:13
      +             $request = [System.Net.WebRequest]::Create($url)
      +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
          + FullyQualifiedErrorId : UriFormatException
  • Error 53
    1 Posts | Last post October 13, 2017
    • Anybody else getting the Error 53 issue? I have asked on this forum on on Jos's other forum, and no reply yet. It would be great if I could get this to work on Server 2012 and Server 2016.
  • Works for username but not password?
    1 Posts | Last post October 10, 2017
    • Hi,
      
      I work in a school and this script is an absolute dream! 
      
      It works pretty much perfectly however I cannot get it to SSO as it takes the users log in username but requires the password. Is it possible to take AD credentials for both username and password? We use RM Unify, I have had a look through the script and changed to what is necessary for RM Unify but the password is still required.
      
      Any help would be appreciated!
      
      Thanks.
      
  • Script about to fail?
    1 Posts | Last post October 09, 2017
    • Office 365 team is about to decommission legacy authentication system to Office 365. Powershell script mapping solutions likely to fail as a consequence - read more here: http://blog.iamcloud.com/is-your-onedrive-mapping-script-about-to-fail
  • Argument "Navigate" Error
    1 Posts | Last post October 04, 2017
    • Hello!
      It does not connect here anymore. This is error:
      
      INFO | Attempting to detect username at https://login.microsoftonline.com/login.
      srf?msafed=0#, waited for 60 seconds
      Exceção ao chamar "Navigate" com "1" argumento(s): "Exceção de HRESULT: 0x800C0
      00E"
      Em C:\users\albarros\Desktop\OneDriveMapper_v3.10.ps1:3190 caractere:32
      +             $script:ie.navigate <<<< ($baseURL)
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ComMethodTargetInvocation
      
      INFO | Attempting to detect username at https://login.microsoftonline.com/login.
      srf?msafed=0#, waited 
      
      
      What can it be?
      Thanks
51 - 60 of 197 Items