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


  • UPN/Email not stores in AD...
    3 Posts | Last post July 10, 2015
    • Jos - Great script and this might seem a strange question but we don't store the email address required in any of the users attributes in AD - I'm going to try and ask for the email when it asks for the password, any pointers?? 
    • Cool. You could copy the CustomInputBox function and assign the value to $userUPN, I'd do some input validation though. To make it pretty, set $objTextBox.UseSystemPasswordChar = $False as well.
    • Yep...doing just that, just a matter of populating $userUPN from the text input...nearly there...cheers.
  • cached credentials
    3 Posts | Last post July 08, 2015
    • Any chance that you'll support the case where cookies cash one or more UPNs used to sign into Microosft on a computer? (resulting in buttons to choose among the accounts instead of username/password field)...
    • It already does in the cases I've tested. (I have 3 cached credentials). This is why the script logs out first.
      
      I do intend to add some additional checks because I've noticed that the new Windows 10 Azure / ADFS Workplace Join also does a form of SSO that currently only works in a 'clean' browser session, even forcibly logging out of both ADFS and O365 doesn't clear the cookie. I'll post an update on my blog when that version is done (I expect this month).
    • Vidar, an update has been posted :)
  • Substring Error
    3 Posts | Last post June 26, 2015
    • Hi Jos, when I run your great script, it give me the following error:
      
      Exception calling "Substring" with "2" argument(s): "Index and length must refer to a location within the string. Parameter name: length"
      In OneDriveAutoLoginAndMap.ps1:467 car:1
      + $userURL = $url.Substring($start,$end)
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
          + FullyQualifiedErrorId : ArgumentOutOfRangeException
      
      The goal seems to be reached because I find my new unit linked to SharePoint and it works but I don't know if error can create some problems.
      
      Do you know how can I resolve this error?
      
      Thank you so much.
      Luca
    • Hi Luca,
      
      This is the part of the script that detects your username from the URL. Because it fails it defaults to your login user name, which is also fine as long as you don't change it :)
      
      Jos.
    • I've fixed this in in version 1.9 :)
  • Error Mapping Drive
    2 Posts | Last post April 22, 2015
    • Hey,
      
      I tried to run your script but failed.
      
      Can you point in the right direction of where the logs are so I can take a look?
    • Hi IceBun,
      
      I'm sorry, technet did not notify me of your comment or I'd have responded earlier. You can find the log by typing %APPDATA% in explorer or in the windows Run menu. 
191 - 194 of 194 Items