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)
68,644 times
Add to favorites
Office 365
2/3/2019
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • 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
  • Mapping Sharepoint document library
    2 Posts | Last post October 02, 2017
    • Hi
      I am very new to all this sharepoint stuff but have tried using the onedrive mapper script and it doesn't appear to work, but at the same time doesn't appear to be throwing up any errors either. Please can you advise how I should go about debugging what isn't working. Extract from the log is:
      
      09/10/2017 15:33:56 | INFO | -----09/10/2017 15:33:56 OneDriveMapper v3.10 - David on DAVES_LAPTOP starting-----
      09/10/2017 15:33:56 | INFO | Script elevation level: User
      09/10/2017 15:33:56 | INFO | Set TLS protocol version to 1.2
      09/10/2017 15:33:56 | INFO | You are S-1-5-21-48182178-1235712511-133348671-1001 running on Windows 10 with IE 11 and Powershell version 5
      09/10/2017 15:33:56 | INFO | Loading CookieSetter...
      09/10/2017 15:33:56 | INFO | Test cookie set successfully
      09/10/2017 15:33:56 | INFO | NOTICE: HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Security HKLM only not found in registry, your zone configuration could be set on both levels
      09/10/2017 15:33:56 | INFO | NOTICE: davidcramp-my.sharepoint.com found in IE Trusted Sites on user level
      09/10/2017 15:33:56 | INFO | NOTICE: davidcramp.sharepoint.com found in IE Trusted Sites on user level
      09/10/2017 15:33:57 | INFO | IE Automatic Proxy Detection is already disabled
      09/10/2017 15:33:57 | INFO | userLookupMode is set to 6
      09/10/2017 15:33:57 | INFO | Retrieved user login from cache C:\Users\David\AppData\Roaming\OneDriveMapper.tmp2
      09/10/2017 15:33:57 | INFO | Retrieved user password from cache C:\Users\David\AppData\Roaming\OneDriveMapper.tmp
      09/10/2017 15:33:57 | INFO | davidcramp@taxassist.co.uk and matching password detected in cache, no need to query user
      09/10/2017 15:33:57 | WARNING | Maximum file upload size is set to 48 MB
      09/10/2017 15:33:57 | INFO | Not mapping O4B because dontMapO4B is set to True
      09/10/2017 15:33:57 | INFO | no unmapped or incorrectly mapped drives detected
      09/10/2017 15:33:58 | INFO | OnedriveMapper has finished running
      
      Thanks
    • you forget maybe  the label ? "https://ogd.sharepoint.com/site1/documentsLibrary,ExampleLabel,Y:"){ the label ?  
  • Some users are experiencing problems accessing Onedrive
    1 Posts | Last post September 07, 2017
    • Hi Jos,
      
      Since several days some users do not see there onedrive-mapping in Explorer. We are working with Citrix and ADFS, users cannot change the trusted site settings. 
      
      In the log in %APPDATA% is see this message: 
      "Script was unable to find browser controls on the login page and cannot continue, please check your safe-sites or verify these elements are present"
      
      As mentioned before, only a couple of users has these issues. I cannot reproduce this problem with my testaccounts and searched the internet for solutions. 
      
      Can you give me a direction to look for?
      Thanks.
      
  • Having problems with the script?
    1 Posts | Last post August 31, 2017
    • It's a great script, but if you're having issues with deployment or reliability then I'd encourage you all to check out: https://www.iamcloud.com/cloud-drive-mapper While there are a few different scripts/solutions to this problem that's pretty much the main one for use in enterprise IT environments. 
51 - 60 of 194 Items