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)
73,609 times
Add to favorites
Office 365
2/3/2019
E-mail Twitter del.icio.us Digg Facebook
  • Unexpected URL
    7 Posts | Last post April 27, 2016
    • I'm getting the following error, but I can 100% confirm I don't have a password issue. Any thoughts? Thanks!!!
      
      We attempted to login without using ADFS, but did not end up at the expected location. Detected url: https://account.activedirectory.windowsazure.com/passwordreset/register.aspx?sspr=1&sspr=1&brandcontextid=O365, expected URL: https://sagu-my.sharepoint.com
    • Looks like you enabled self service password reset for this user but did not register for it yet at the specified url.
    • Perfect, thank you! One more: I have had a couple folks time out the first time when it's looking up the username. I just run it again, and it's fine; but was wondering if I could change that wait time here:
      if($dontMapO4B -eq $False){
          while($url.IndexOf("/personal/") -eq -1){
              Sleep -s 3
              $timeSpent++
              $ie.navigate($baseURL)
              do {sleep -m 100} until (-not ($ie.Busy))  
              do {sleep -m 100} until ($ie.ReadyState -eq 4 -or $ie.ReadyState -eq 0)  
              $url = $ie.LocationURL
              if($timeSpent -gt 10){
                  ac $logfile "Failed to get the username from the URL for 30 seconds while at $url, aborting" 
                  $errorsForUser += "Mapping cannot continue because we cannot detect your username`n"
                  abort_OM 
              }
          }
    • certainly, you could increase the number 10 to, for example, 20, then it would wait for 60 seconds. If this is happening because your users had never accessed onedrive before, I recommend you use O365Migrator to preprovision their Onedrive storage.
    • Awesome; thanks so much!
    • I actually had one more strange thing pop-up. When it lists the size of the drive, it simply copies what is available in C, instead of an accurate limit. Anyway to bypass this? I want to copy a large chunk of data, but can't because windows thinks I don't have enough space.
      
      Thanks again!
    • Hi James, 
      
      i'm afraid that that is a bug or 'feature' in the WebDav client, it's been that way since it exists and I don't know of a workaround.
  • Unexpected URL
    1 Posts | Last post April 26, 2016
    • I'm getting the following error, but I can 100% confirm I don't have a password issue. Any thoughts? Thanks!!!
      
      We attempted to login without using ADFS, but did not end up at the expected location. Detected url: https://account.activedirectory.windowsazure.com/passwordreset/register.aspx?sspr=1&sspr=1&brandcontextid=O365, expected URL: https://sagu-my.sharepoint.com
  • V 2.28 -> error message
    3 Posts | Last post April 07, 2016
    • Hi Jos,
      
      I use the script for mapping a SharePoint library as a drive in a RDS environment.
      The mapping as such is working fine, but the users get the following error-message:
      
      The object invoked has disconnected from its clients. (Exception from HRESULT:
      0x80010108 (RPC_E_DISCONNECTED))
      At C:\xxx\xxx\xxxx\OneDriveMapper_xxx.ps1:344 char:11
      +       if ($ShellWindows.Item($i).FullName -like "*iexplore.exe")
      +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [], COMException
          + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
      
      
      The onedrivemapper.log looks perfectly fine.
      I am using the script you provided 2 days ago.
      
      Do you have an idea how to get rid of this message?
      
      Benni
    • Because of the diversity in implementations out there, the script has two methods to remove the used Internet Explorer objects for login+mapping. You can safely ignore this error. If you don't want the user to see it, I recommend running the script in hidden mode (instructions on my blog).
      
      Alternatively you could nest the second part in a try/catch loop and hide the error that way.
    • Thanks for the feedback.
      ... running smoothly in the background now ...
      
      
  • V2.28 not working
    7 Posts | Last post April 04, 2016
    • Hi all,
      
      I am successfully running version 2.21 of this great script.
      But when I want to upgrade it to 2.28 (or 2.27), I always run into errors.
      See the contents of the logfile:
      
      -----04/04/2016 10:00:02 OneDriveMapper V2.28 - <username> on <servername> Session log-----
      lookupUPNbySAM is set to True -> Using UPNlookup by SAMAccountName feature
      
      Script elevation level: Administrator
      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
      NOTICE: XYZ-my.sharepoint.com found in IE Trusted Sites on user level
      NOTICE: XYZ.sharepoint.com found in IE Trusted Sites on machine level
      Adding to mapping list: Q: (\\XYZ-my.sharepoint.com@SSL\DavWWWRoot\personal\)
      Adding to mapping list: Q: (\\XYZ.sharepoint.com@SSL\sites\AAAAA\BBBB\)
      Q: is not yet mapped
      Q: is not yet mapped
      Base URL: https://XYZ-my.sharepoint.com 
      
      WARNING: no instances of Internet Explorer running yet, at least one should be running
      autoProtectedMode is set to True, disabling ProtectedMode temporarily
      Zone 0 was set to 3, setting it to 3
      Zone 1 was set to 3, setting it to 3
      Zone 2 was set to 3, setting it to 3
      Zone 3 was set to 3, setting it to 3
      Zone 4 was set to 3, setting it to 3
      current URL: https://login.microsoftonline.com/
      Detected running explorer process
      Login attempt at Office 365 signin page
      Found sign in elements type 2 on Office 365 login page, proceeding
      attempting to trigger a redirect to ADFS
      login detected, login function succeeded, final url: https://XYZ-my.sharepoint.com/_layouts/15/me.aspx
      Failed to get the username from the URL for 30 seconds, aborting
      
      
      Do you have an idea?
      
      Benni
      
      
    • You're just mapping Onedrive? Then leave line 80/81 of the script to it's default, that is meant to map a sharepoint library but you're setting it to your onedrive URL (or so it seems).
    • Hi Jos,
      
      just checked the script. It looks like the following:
      
      Line 78 $sharepointMappings = @()
      Line 79 $sharepointMappings += "https://XYZ.sharepoint.com/sites/AAAAA/BBBB/,BBBB,Q:"
      Line 80 #for each sharepoint site you wish to map 3 comma seperated values are required, the 'clean' url to the library, the desired drive label, and the driveletter
      Line 81 #if you wish to add more, copy the example as you see above, if you don't wish to map any sharepoint sites, simply remove the line or clear everything between the quo....
      
      The lines you mentioned are only comments. I assume you mixed it up.
      Do you mean the lines 78 and 79 instead?
      
      Line 78 is on default and Line 79 has been adapted?
      
      Should it look like that?
      
      $sharepointMappings += "https://XYZ.sharepoint.com/site1/documentsLibrary,testLabel,Y:"
      
      Benni
      
      
    • Hi Jos,
      
      I just realized the I did not answer your question. :(
      No, I don't map one-drive, I am mapping a SharePoint library.
      
      Benni
    • Ah yes, 79, true.
      
      If you're not mapping O4B, you should set $dontMapO4B to $False.
      Now you're basically telling the script to map O4B to Q: and then map a Sharepoint Library to Q: as well.
      
      Secondly, I see you've customized your implementation, the user does not end up at his O4B after logging in but at me.aspx. I've adjusted the script to not fail when this is the case, you'll have to redownload v2.28.
    • Thanks Jos.
      I am going to test and come back.
    • Hi Jos,
      
      I confirm that it is working fine now.
      Many thanks for your quick support.
      
      In addition many thanks keeping this script up-to-date and helping 
      us to fix our issues.
      
      Benni
  • Won't add drive after prompt for password
    6 Posts | Last post April 02, 2016
    • Hello,
      
      I think I managed to 'connect' to my O4B (purchased O365 through godaddy which), but the drive won't show in explorer. I think it's because i'm missing some final steps regarding my PC-settings. 
      
      This is what the log says in the end:
      
      lookupUPNbySAM is set to False -> Using Joris@*********.nl from the currently logged in username + *********.nl
      Script elevation level: Administrator
      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
      Possible critical error: netorgft1165353.onmicrosoft.com.sharepoint.com not found in IE Trusted Sites on user or machine level, the script will likely fail
      Possible critical error: netorgft1165353.onmicrosoft.com-my.sharepoint.com not found in IE Trusted Sites on user or machine level, the script will likely fail
      WARNING: HKLM:\Software\Policies\Microsoft\Internet Explorer\Main\DisableFirstRunCustomize not found in registry, if script hangs this may be due to the First Run popup in IE
      Possible error: HKLM:\Software\Policies\Microsoft\Internet Explorer\Main\DisableFirstRunCustomize not set
      Adding to mapping list: X: (\\netorgft1165353.onmicrosoft.com-my.sharepoint.com@SSL\DavWWWRoot\personal\)
      X: is not yet mapped
      
      I checked the trusted websites, this is ok. 
      The register keys are indeed missing, could this be the problem? How do I add these?
      
      Kind regards,
      
      Joris
    • I'd recommend following the installation instructions on my blog. You'll also have to set the $forceUserName variable I think, as it seems you're running it on a non-domain machine.
      
      And $O365CustomerName should be set to the TENANT name, not to the whole domain name (so no onmicrosoft.com)
      
      blog: http://www.liebensraum.nl
      
    • Hi Jos,
      
      Thanks for the quick reply. I Adjusted the settings and came a bit further.
      
      
      Login attempt at Office 365 signin page
      Found sign in elements type 2 on Office 365 login page, proceeding
      attempting to trigger a redirect to ADFS
      Login splitter detected, your account is both known as a personal and business account, selecting business account..
      waited for more than 10 to get redirected to ADFS, checking if we were properly redirected or attempting normal signin
      asking user for password
      Failed to find the correct controls at https://sso.godaddy.com/?domain=********.nl&realm=pass&app=o365&username=********&wa=wsignin1.0&wtrealm=urn%3afederation%3aMicrosoftOnline&wctx=estsredirect%3d2%26estsrequest%3drQIIAbPSySgpKSi20tcvyC8qSczRy81MLsovzk8ryc_LycxL1UvOz9XLL0rPTAGxioS4BJ4dLK5ZK7rBd0PL8pRwm6CqVYzKhI3Qv8DI-IKR8RaToH9RumdKeLFbakpqUWJJZn7eIybe0OLUIv-8nMqQ_OzUvEnMfDn56Zl58cVFafFpOfnlQAGgCQWJySXxJZnJ2aklu5hVUszNE83NzFN0LS1STHRNTMxNdC3Skox0zYxMU1MtU1OMjS2NL7AI_GBhPMDJCAA1%26LoginOptions%3d1&popupui=&LoginOptions=1 to log in by script, check your browser and proxy settings or check for an update of this script
      autoProtectedMode is set to True, reverting to old settings
      
      I think it's because login.microsoftonline.com redirects me to godaddy login site. 
      On the godaddy site the script doesn't recognize the controls. 
      
      Any clue.
      
      
    • Any clue is welcome I meant to say ofcourse.. :-)
      
      Thanks in advance.
      
      Joris
    • Okay, I managed to fix it. Think what solved is was:
      
      $urlOpenAfter       = "https://portal.office.com/Home/"
      $debugmode          = $True
      
      By putting debug mode on "True" I was able to manually bypass the "Godaddy" login screen. I Hope this helps for others who might experience comparable issues.
      
      Furthermore, I have two questions:
      - The script added two shares, instead of one. How do I remove one from the explorer?
      - Is it possible to set a password/pin for the share for each time I boot my PC?
      
      Kind regards,
      
      Joris
    • hmmm, I didn't know godaddy did a redirect / SSO on their own, you'd have to figure out the ID's of the form elements they use so you don't have to manually get around it.
      
      Two shares: you probably configured a sharepoint mapping, it would otherwise never map two drives.
      
      Password/pin: not without third party software
  • Issue on Server 2012 R2
    3 Posts | Last post April 01, 2016
    • Hi there Jos, 
      
      First of all, thanks for creating such a useful script. Personally I will be using this to create a persistent mapped drive on a single server. This mapped drive will allow our MFD scanner to scan documents into SharePoint Online directly :)
      
      I am having the following problem when I run the script:
      
      Error message displayed on screen:
      Cannot find an overload for "getElementById" and the argument count: "1".
      At C:\Users\administrator\Downloads\OneDriveMapper_v2.22.ps1:347 char:8
      +     if($ie.document.GetElementById("_link").tagName -ne $Null){
      +        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodException
          + FullyQualifiedErrorId : MethodCountCouldNotFindBest
      
      Last lines of log file (note, we are not using ADFS):
      Detected running explorer process
      Login attempt at Office 365 signin page
      attempting to trigger a redirect to ADFS
      Failed to find the correct controls at https://login.microsoftonline.com/login.srf?wa=wsignin1%2E0&rpsnv=4&ct=1449571833&rver=6%2E1%2E6206%2E0&wp=MBI&wreply=https%3A%2F%2Fhealthenterpriseeastcouk%2Esharepoint%2Ecom%2F%5Fforms%2Fdefault%2Easpx%3Fapr%3D1&lc=1033&id=500046&guests=1 to log in by script, check your browser and proxy settings or check for an update of this script
      autoProtectedMode is set to True, reverting to old settings
      Setting zone 1 back to 3
      
      
      The server is hosted in Azure and IE is configured to auto detect LAN settings. Any ideas what might be causing this?
      
      Thanks,
      
      David
    • Hi David,
      
      nice idea :) You could also use a mail-enabled document library in Sharepoint to do that, and have it mail it there.
      
      As for the error, I'd need the full log I'm afraid....
      
      If you don't want to post it here you can email it to josliebennu where the at is between sl and the dot is between nn
    • Hello David and Jos,
      
      Did you both manage to solve the issue regarding "finding the correct controls"?
      I think I'm currently experiencing the same issue.
      
      Thanks,
      
      Joris
      
  • Using script with ADFS
    16 Posts | Last post March 30, 2016
    • We are using ADFS 3.0 with our O365. I have only been able to get the script to work by catching IE at some point and selecting "keep me signed in". If I don't and I just let ADFS pass me through, I get logged in the browser (successfully see in debugging mode) but the script will throw "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."
      Do you have any suggestions on how to get this to work seamlessly with ADFS? Almost there!
    • Your saying the script is not checking the 'keep me signed in' checkbox? (when running in debug mode).
      
      Does the log file tell you anything? :)
    • I thought that was what was happening but haven't been able to reproduce a successful login. Fails pretty much every time I have tried. With debugging turned on I can see it bring up IE, force a logoff I'm assuming (says you have logged off) then logs me into OneDrive (I get no prompts because using ADFS). Then it logs me off again and back. Almost like twice. Then I get the error message. Logging into OneDrive manually works without issue. ADFS logs me in each time and working as expected. If I go to me address https://thelogchurch-my.sharepoint.com I get right into my personal OneDrive space.
    • Last part of log file:
      
      Failed to find /personal/ in the URL: https://thelogchurch-my.sharepoint.com/_layouts/15/start.aspx#/mysiteredirect.aspx, waiting 5 seconds and trying again
      
      Detected user: test123_logchurchpa_org
      
      Current location: https://thelogchurch-my.sharepoint.com/personal/test123_logchurchpa_org/_layouts/15/onedrive.aspx#AjaxDelta=1&isStartPlt1=1459047311879
      browsing to Sharepoint to validate existence and set a cookie
      Session established, attempting to map drive(s)
      
      Mapping target: \\thelogchurch-my.sharepoint.com@SSL\DavWWWRoot\personal\test123_logchurchpa_org\Documents
      
      Failed to map O: to \\thelogchurch-my.sharepoint.com@SSL\DavWWWRoot\personal\test123_logchurchpa_org\Documents, error: 2 System error 224 has occurred. 
      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.
      
      
      
      autoProtectedMode is set to True, reverting to old settings
      Setting zone 0 back to 0
      Setting zone 1 back to 3
      Setting zone 2 back to 0
      Setting zone 3 back to 0
      Setting zone 4 back to 0
      OnedriveMapper has finished running
    • Lastly, I do have the two below URLs added to my Trusted Sites in IE and I have it configured for User Authentication - 
      "Automatic logon with current user name and password"
      
      https://thelogchurch-my.sharepoint.com
      https://thelogchurch.sharepoint.com
    • then this is where the problem is:
      
      "then logs me into OneDrive (I get no prompts because using ADFS)."
      
      In other words, you were logged off from ADFS, but not from Sharepoint Online, because you can navigate there directly without prompts. 
      
      You need to be truly logged out, I've seen this before even without ADFS but haven't had time to dig into it. Basically, you have to be fully logged out before running the script.
      
      Also see this KB by MS: https://support.microsoft.com/en-us/kb/2507767, probably mostly step 5 since the script already handles step 4.
    • And User Authentication - 
      "Automatic logon with current user name and password" should not be necessary for sharepoint, only for your ADFS FQDN. ADFS then signs you in and forwards the ticket to Sharepoint Online.
      
      And ADFS should be in the local intranet zone
    • This is basically a list of steps I've taken. Even recorded a screen video if interested.
      
      Added the following URLs to my Trusted Sites
      •https://*.microsoftonline.com 
      •https://*.sharepoint.com 
      •https://*.outlook.com
      •https://*.lync.com 
      
      Logon Options for trusted sites - Not Configured (Defaults to "Automatic logon with current user name and password")
      
      Added URL to ADFS to Intranet Sites
      https://adfs.logchurchpa.org
      
      Logon Options for Intranet sites - "Automatic logon with current user name and password"
      
      Log in using new user profile
      Launched OneDrive URL manually - https://thelogchurch-my.sharepoint.com (ADFS logs me in successfully automatically).
      Click on "Sign Out". (ADFS shows "You have successfully signed out")
      Even visit https://login.microsoftonline.com/logout.srf to sign out for good measure.
      Delete all Browser History/Temp files
      Close Browser and reopen.
      Kill (End Process Tree) for iexplore.exe.
      
      Launch script (in debug mode)
      IE launches https://login.microsoft..... says "You signed out of your account".
      I then see the URL change to my ADFS URL and then i end up in my personal OneDrive space (https://thelogchurch-my.sharepoint.com)
      Page almost refreshes or loads the OneDrive page again?? But i end up starring at my OneDrive files again.
      Then error message comes up: "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."
      
      Is this still thinking I'm logged in somehow???
    • What if you skip the first time accessing Onedrive and use a clean profile and run the script?
      
      I'm missing the part where it has to go from login.micr... to your adfs server. That usually only happens if *.sharepoint.com thinks you're already logged in. 
      
      So, after the 'logout' that the script does, you should see it go to login.mic..., enter the email and check the box, and then it should automatically go to ADFS, get signed in etc.
    • It totally just dawned on me that we have "Sign-In Acceleration" turned on for our tenant. This allows for "home realm discovery" for our internal users and therefore they don't have to type in their UN when going to the https://thelogchurch-my.sharepoint.com. So basically it will hit login.microsoft.com, recognize the federation and no UN will be required, hands off to ADFS and puts you on the SharePoint page with hardly any user interaction. Pretty seamless. 
      
      Links for enabling Sign-In Acceleration:
      https://support.office.com/en-us/article/Enable-auto-acceleration-for-your-SharePoint-Online-tenancy-74985ebf-39e1-4c59-a74a-dcdfd678ef83
      
      https://msryanph.wordpress.com/2015/02/20/sharepoint-online-sign-in-acceleration-sso-for-spo/
      
      With that being said - Will this script work with this type of setup?
    • Ah that clears up the confusion and explains why you never see the logon page. I didn't know about Auto-Acceleration. For now, the script will not work if you have Auto-Acceleration enabled.
      
      I do see a whr variable is added to the url to identify it as such, this offers potential for a fix, but I do not have an ADFS environment where I can turn Auto-Acceleration on, so I cannot develop / test a fix right now.
      
      If you need help badly, build a 'safe' VM for me and I'll log on to it and develop a fix in your environment.
    • This seems to actually be a setting that's configured on the SharePoint side for the tenant. This wasn't actually something I did on the actual ADFS server. 
      
      I don't have a problem with you taking a look at the setup in our environment. What would you need?
    • Errr VM hostname, login and password for the VM and login and password for the test user in Office 365. You've already supplied the rest I think :)
    • And of course a safe place to send: josliebennu, add the right characters between sl and nn to get my email address.
    • Alright. I sent you a message. Let me know if you received it.
    • For whoever runs into this: I took a look at what Auto-Acceleration does in Steve's environment and added functionality to v2.28 of OnedriveMapper to handle it properly :)
  • Failed to browse to the Office 365 Sign in page
    4 Posts | Last post March 22, 2016
    • Hello,
      
      we are getting the following error:
      
      Failed to browse to the Office 365 Sign in page, this is a fatal error The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))
      
      ERROR: attempt to navigate caused the IE scripting object to be nulled. This means your security settings are too high (1).
      
      I had tried our tenant name by itself, with .onmicrosoft.com and and with .sharepoint.com at the end and results are the same.
      
      In PS window it says
      
      Could not get dispatch ID for Quit (error: 0x80010108)).
      At C:\Users\romang\Desktop\OneDriveMapper_v2.27 (2)\OneDriveMapper_v2.27.ps1:319 char:5
      +     $ie.Quit() | Out-Null
      +     ~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [], MissingMemberException
          + FullyQualifiedErrorId : System.MissingMemberException
      
      What am I doing wrong?
      
      
      Thanks,
      
      Roman
    • Please post your config and the full log file (obscure what is needed), or email it to me (see earlier comments for my email address). 
      
      You're most likely running into Protected Mode being enabled/blocking you.
    • It started working this morning out of the blue after reboot... Thanks for getting back to me.
    • could be conflicting group policies then...make sure the safe list / protected mode settings are executed before the script executes :)
  • Error Occured while reconnecting???
    7 Posts | Last post March 17, 2016
    • Hey Jos,
      
      Im now having another issues with the script.  when the user logs in, they see the onedrive mapping, but gets an error while reconnecting.  saying access denied.  was working great yesterday..  not sure what could have changed.  
    • So, I went into the registry and removed the mapped drive.  now everytime I log in, the O365 login page comes up saying I was signed out.  doesn't really let me log in, but then the window disappears. we don't use ADFS. any help would be appreciate.. have a huge rollout next week. 
      
      this is the log:
      
      Script elevation level: User
      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
      NOTICE: fidelcoguide-my.sharepoint.com found in IE Trusted Sites on user level
      NOTICE: fidelcoguide.sharepoint.com found in IE Trusted Sites on user level
      Adding to mapping list: X: (\\fidelcoguide-my.sharepoint.com@SSL\DavWWWRoot\personal\)
      X: is not yet mapped
      Base URL: https://fidelcoguide-my.sharepoint.com 
      
      autoKillIE disabled, IE processes not stopped. This may cause the script to fail for users with a clean/new profile
      autoProtectedMode is set to False, IE ProtectedMode will not be disabled temporarily
      current URL: https://login.microsoftonline.com/login.srf?wa=wsignin1%2E0&rpsnv=4&ct=1458233807&rver=6%2E1%2E6206%2E0&wp=MBI&wreply=https%3A%2F%2Ffidelcoguide%2Dmy%2Esharepoint%2Ecom%2F%5Fforms%2Fdefault%2Easpx%3Fapr%3D1&lc=1033&id=500046&client%2Drequest%2Did=ee7a699d%2De0b2%2D2000%2D0911%2Dd4f93f9f908f
      Detected running explorer process
      Login attempt at Office 365 signin page
      attempting to trigger a redirect to ADFS
      Failed to find the correct controls at https://login.microsoftonline.com/login.srf?wa=wsignin1%2E0&rpsnv=4&ct=1458233807&rver=6%2E1%2E6206%2E0&wp=MBI&wreply=https%3A%2F%2Ffidelcoguide%2Dmy%2Esharepoint%2Ecom%2F%5Fforms%2Fdefault%2Easpx%3Fapr%3D1&lc=1033&id=500046&client%2Drequest%2Did=ee7a699d%2De0b2%2D2000%2D0911%2Dd4f93f9f908f to log in by script, check your browser and proxy settings or check for an update of this script
      
      OnedriveMapper has finished running
      
    • Could have several reasons....I noticed you set autoProtectedMode to false, and autoKillIE to false? Try setting those to True first.
      
      If you need quick assistance, you can email josliebennu (add the correct characters between sl and nn) for my skype, but I won't be able to remotely assist you for free. 
    • im not sure what changed, but now it seems to have mapped the onedrive again, but the sharepoint library is not mapping.  I guess the question is, can I use your script to map onedrive AND the sharepoint libraries at the same time, or do I need to run 2 separate scripts? If I run them together, is this correct for my lines?
      
      79 $sharepointMappings = @()
      80 $sharepointMappings += "https://fidelcoguide.sharepoint.com/Management/Shared%20Documents,Management,Z:"
      
      
      
      101 if($sharepointMappings[0] -eq "https://fidelcoguide.sharepoint.com/Management/Shared%20Documents,Management,Z:"){
      
       
    • Yes it can do both at once, you should not have changed line 101, if you set it back to if($sharepointMappings[0] -eq "https://ogd.sharepoint.com/site1/documentsLibrary,ExampleLabel,Y:"){ it should work, although you may have to change %20 to a space character, not 100% sure but try both :)
    • OMG.. I cant believe I made that stupid mistake..  urgh.. okay.  they are mapping now.  thank you so much.  one last question.  If I put this in a login script and a user does not have rights to a shared library, it wont map the ones they don't have access to, correct?  I just want to be sure.   :)
    • Haven't tested that, but even if it would map, the user would see an empty drive or an errot
  • sharepoint libraries not mapping...
    4 Posts | Last post March 17, 2016
    • Hey Jos,
      
      I finally got this working in our hosted environment, however, we are trying to not only map the Onedrive, but also shared document libraries.   It maps the OD fine, but doesn't seem to even attempt to map sharepoint.  any thoughts?  I tried turning debug on, but that doesn't seem to work either.. not getting any messages. 
    • The log file should detail IF it attempts / plans to map the configured Sharepoint library(s) that you configured in line 80 and further of the script.
    • Hey Jos,
      
      this is what I am seeing in my log
      
      ----03/16/2016 15:00:23 OneDriveMapper V2.27 - fidelco_bmcadmin on C61 Session log-----
      lookupUPNbySAM is set to True -> Using UPNlookup by SAMAccountName feature
      
      Script elevation level: User
      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
      NOTICE: fidelcoguide-my.sharepoint.com found in IE Trusted Sites on user level
      NOTICE: fidelcoguide.sharepoint.com found in IE Trusted Sites on user level
      Not mapping O4B because dontMapO4B is set to True
      no unmapped or incorrectly mapped drives detected
      autoProtectedMode is set to True, reverting to old settings
      OnedriveMapper has finished running
      
    • looks like you didn't add any sharepoint mappings OR those driveletters are already mapped, which is why it is not proceeding.
161 - 170 of 197 Items