OneDriveMapper

onedrivemapper

OneDriveMapper is a free, open source script I wrote to be used as a logon or on demand script to map OneDrive for Business and/or Sharepoint Online to driveletters and/or Network Locations, it has been downloaded over 2,500,000 times and has millions of users.

It was designed to run in scenario’s where using the Onedrive for Business client is not feasible, such as legacy multi-user environments like Citrix or within a RemoteApp. Syncing in such environments is a bad idea as each user potentially has to re-sync data at each login and can potentially access other user’s data.

Download open source version:

OnedriveMapper V3 / older releases (does not support all types of MFA, conditional access etc but has more features. Still seems to work on all OS’es)

OnedriveMapper v4 (very lightweight and simple version that supports all kinds of MFA but depends on Internet Explorer)

OnedriveMapper v5 beta 1 (next iteration of v4 but using Edge instead of Explorer, but does not work on older OS’es like W2008/2012)

Enterprise alternative (with support & discount):

IAM Cloud Drive Mapper

How to install (instruction for V5)

  1. Make sure Edge Chromium is installed
  2. Make sure .NET 3.5 and PowerShell v3 or higher are present on the Machine
  3. Download the latest version at GitLab to a network share or your devices
  4. Download the Selenium Webdriver.dll from NuGet or GitLab to the same folder as OnedriveMapper.ps1
  5. Download the Edge msedgedriver.exe from NuGet or GitLab to the same folder as OnedriveMapper.ps1
  6. Add https://tenantname-my.sharepoint.com to your Trusted Sites list if mapping to O4B
  7. Add https://tenantname.sharepoint.com to your Trusted Sites list if mapping to Sharepoint Sites, O365 Groups or Microsoft Teams
  8. Add adfs.yourdomain.com to your local intranet sites (both http and https) to get SSO if you’re using ADFS. Make sure that whatever method you use to set this, runs BEFORE the script runs.
  9. Set $O365CustomerName to your Tenant Name (xxx.onmicrosoft.com) in the script’s source code
  10. disable file locking
  11. Run it on a representative test machine / user and thoroughly check the log it generates in %APPDATA%
  12. Add the configured script to a Group Policy or deploy as MSI to make it run upon logon for all users, automatically mapping your OneDrive for Business webdav share to a driveletter.

When do I use OnedriveMapper?

In short: only when you have no other choice!
With Files On Demand and GPO support for passthrough auth and automatic mapping of sharepoint and teams sites, the need for OnedriveMapper has been greatly reduced. When you’re thinking of adopting VDI, go Azure Virtual Desktop with FSLogix instead of OnedriveMapper.

Please try to make the effort to educate your users, don’t swim against the current; start embracing new cloud technologies.

If you really have no other option, e.g. you have automated processes you cannot yet rewrite to use the Onedrive API, or are working in a W7/W2012 multi user environment and can’t just use the web interface. Do make sure your systems do not fully depend on mapping drives as they could break at any time, WebDAV is not a very….’recent’ technology and Microsoft does not give any hard guarantees as till when it will be supported.

So what does OnedriveMapper do?

  • Runs at logon or on demand (group policy, RES, etc)
  • Maps to Onedrive for Business (with auto detection of the user’s URL)
  • Maps to Office 365 Groups and Teams
  • Maps to Sharepoint Online
  • No Sync, online WebDav connection over HTTPS
  • No user interaction if SSO is enabled
  • On Demand Provisioning of the OneDrive MySite
  • Detailed and configurable logging
  • Map based on AD security groups
  • Custom labeling of drives
  • Can also run on non domain joined machines or Workplace Joined machines
  • Detects changed user names/url’s automatically
  • Can map drives inside (Azure) RemoteApps or Citrix Seamless Apps
  • Can redirect OS folders (like My Documents)
  • Can converge multiple mappings in a single driveletter
  • SSO for MDM Intune AzureAD W10 devices
  • Can be deployed as logon script through Intune
  • Can easily run from a shortcut as well

Recommendations

Limitations

  • If SSO is not configured or MFA is required, the script will show the user a popup to authenticate
  • This script does not work Powershell V2 or lower (comes with Windows 7), install V3 or higher
  • This script does not operate on Windows 2012 R2 (or lower) as the Selenium webdriver component does not support this.

Disclaimer

I’m not a real programmer, this code is meant as an example. I do not guarantee this product will work in your setup, and I offer no dedicated support, I try to help everyone on a best-effort basis but also have to work for a living. So make sure you test well before you use it. This script may suddenly become obsolete without prior warning if Microsoft feels that WebDAV should no longer be supported. For an enterprise worthy and supported product, I recommend using IAM Cloud Drive Mapper instead of an open source script. If you use LIEBEN25 as referral code with IAM Cloud, you’ll get a 25% discount.

old changelog

FAQ

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2.1K Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Ian
Ian
3 years ago

OnedriveMapper no longer mapping drives and coming up with error message that the website is not listed in the Trusted Sites list.. v3.13

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.

trackback

[…] OneDriveMapper […]

Edwin
3 years ago

Our mapped drives have stopped working. The error 224 is thrown when the NET USE command is executed. Did MS removed completely the “stay logged-in” option?

Rick de Vries
Rick de Vries
3 years ago

Anyone notice OnedriveMapper no longer mapping drives and coming up with error message that the website is not listed in the Trusted Sites list, while it actually is? I had a few users experience that in the past few days and each day another user experiences it, so the list of users unable to map is growing.

Alan
Alan
3 years ago

For those with a 224 error regarding access denied, I was able to solve my issue by updating my ADFS configuration to set persistent cookies which are required by WebDav per this article: https://blogs.technet.microsoft.com/sposupport/2017/09/16/cookie-persistence-in-sharepoint-online/

Albert
3 years ago

Hi!! Thanks for the script! It is really great! i have been testing it in my environment and it works like a charm. The only drawback that I have, is when I configure O365 MFA on the user account, in my case it starts to send SMS text to the mobile, but is it not possible to bypass this step. I have seen that in the script you have something like “handle MFA in native auth mode” but I tried to put “native” and “ie” in $authodmethod in case to try all possible cases, but unfortunately with the same result.… Read more »

Chris L-M
Chris L-M
4 years ago

Hi Jos, Awesome script, thanks for making it. I wanted to inform you of issues we have been having with “ie” mode for the last couple of weeks. When logging in to O365 the script is not finding the expected URL for a successful login. As a result, it asks for a new password, then tries again, asks again, then the script continues, gives an error message with the URL that it didn’t like, maps the drives correctly, then pops up an error message saying that mapping was unsuccessful. I suspect that Microsoft have changed the format of the URL… Read more »

Vrajes
Vrajes
2 years ago

Thanks for the amazing script.. We are running into issue where your script is not working few Machins(Citrix VDI) . Looking forward for your help in fixing this issue . 1 . If i map drive URL via Net use fails 2. Use run command \\Path\\ works fine 3. If i map drive via Computer–>Map drive fails 02/14/2019 00:59:03 | INFO | Mapping target: \\XXXXXXXX.sharepoint.com@SSL\DavWWWRoot\personal\username_net\Documents 02/14/2019 00:59:04 | ERROR | ERROR: detected string error 67 in return code of net use command, this usually means the WebClient isn’t running 02/14/2019 00:59:04 | ERROR | failed to contact O: after mapping… Read more »

Bill Hixon
2 years ago

I’m having the dreaded 224 error come up regularly now. I’ve reset IE and rebooted, no change. I am getting this error before the 224:

Failed to set a cookie: Exception calling “SetWinINETCookieString” with “3” argument(s): “Exception setting cookie: Win32 Error code=4317”

Is this the cause, and if so, what do I do to fix this?

Andy
Andy
3 years ago

The script has and is working perfectly. Thanks Jos. However we have had OneDrive drops. This seems to be related to the cookie being deleted \ dropping. When this happens we get the trusted sites error. Running the script fixes until the cookie drops again. Anyone else getting this? We are on W10 various builds.

Sam
Sam
4 years ago

Hi Jos, OneDrive mapped has stopped mapping OneDrive this morning for all our users, still maps the additional Sharepoint sites, just not the OneDrive, error below; Mapping target: \{domain}-my.sharepoint.com@SSLDavWWWRootpersonal{user_domain}Documents ERROR: detected string error 224 in return code of net use command, this usually means your trusted sites are misconfigured or KB2846960 is missing failed to contact H: after mapping it to \{domain}-my.sharepoint.com@SSLDavWWWRootpersonal{user_domain}Documents , check if the URL is valid. 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… Read more »

Jason
Jason
3 years ago

We’re getting this error now

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.

We have the sites added to trusted sites and ave for a while.

We recently updated to Windows 10 1709 could that be a factor?

John
John
3 years ago

I have been using your script for months and only occasionally does it stop working usually there is a later version which fixes it for us but this time we are on the latest so am after a bit of help with the errors, I have been through the FAQ and nothing has helped solve it. To note nothing has changed on our network since it was last working to now so no updates to clients no policy changes no adfs changes etc. through the appdata log these are our errors. ERROR | IE Zone 3 protectedmode is enabled through… Read more »

trackback

[…] OneDriveMapper […]

Kevin De Schrijver
Kevin De Schrijver
4 years ago

Feature request: Great script. I have hidden the powershell window but at the moment the statusbar “Mapping your Office 365 Drives” is persistent and cannot be minimized during the mapping stage.

Could you make it minimizeable so that users have the choice to wait for their drives to connect or open another application and start working without the statusbar stuck in their face.

Tommy
Tommy
1 year ago

Anyone else getting error 59 or 53 the last few weeks?
Microsoft must have limited something after the huge increase in Teams usage.

sven
sven
1 year ago

Hi all
OneDriveMapper cann login with sso, see the website goes open and i see my files but the this error apears :failed to contact X: after mapping it to \\ourtenant-my.sharepoint.com@SSL\xxxx_xxxxx_xxxxx_xx\Documents, check if the URL is valid. Error:
Systemfailure 224 add to trusted sites. But when i check via PS all sites are in the trusted zone. Any Idea?
Thanks Sven

Ben
Ben
2 years ago

Thought I’d just mentioned that I’m redirecting the desktop, but instead of using the restart explorer function, I’m issuing a refresh of the desktop.

code:
Add-Type -MemberDefinition $code -Namespace WinAPI -Name Explorer
[WinAPI.Explorer]::Refresh()

It works reliably and is a nicer experience than restarting explorer.

SThurston
SThurston
2 years ago

We successfully mapped drive using the $adsfSmartLink setting set to “https://login.microsoftonline.com/login.srf?wa=wsignin1.0&whr=my.company.domain&wreply=https://mycomp-my.sharepoint.com&LoginOptions=1” where my.company.domain and mycomp are replaced with your values. I had been unable to map it before as I was never getting the Stay Signed In box in the browser.

Pradzy
Pradzy
2 years ago

Here is a good bat code to use to execute the PS1 script for the above mapper

@echo off
net use x: /del
PowerShell -NoProfile -ExecutionPolicy Bypass -Command “yourpath\OneDriveMapper.ps1”

Emalf13
Emalf13
3 years ago

Great work with this. Thanks.

I have gotten version 3.14 working. Much faster and smoother than 3.13.

However, I am having issues with the Folder Redirection. All work except for the Downloads folder. This keeps insisting on redirecting to the local PC. The downloads folder in the registry is named the same as the SID {374DE290-123F-4565-9164-39C4925E467B} rather than Downloads or MyDownloads. This is present in the GUID’s ($KnownFolders), and ‘Downloads’ is in Set-KnownFolderPath. But NOT in Get-KnownFolderPath. I have tried adding this as Downloads and the SID’s but to no avail.

Any ideas please?

Mike
Mike
3 years ago

Recently we have been getting error 224 out of nowhere. we haven’t made any changes to IE or the settings. We do manage IE settings via group policy but I cannot seem to find what the “misconfiguration” is. I tried to reset IE and still no luck. Any help would be greatly appreciated!

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

Emil Sandberg Lyngved
3 years ago

Having an issue with a new user, all the other users work fine, but this one does not. we are using version 3.0.8 — after a lot of retries and after entering the passord, a box pops up saying: “Mapping cannot continue because we cannot detect your username”. and also the script itself is reporting in red: ERROR: Failed to find the correct controls at (customers site) to log in by the script. The element cred_keep_me_signed_in_checkbox was not found (2) or had no tagName. what could be the problem? the only user it doesnt work for is this one, and… Read more »

Simon
Simon
3 years ago

Hi Jos,
The POST Login redirect issue seems to have reared its head again.
Are you aware if Microsoft has made any URL changes again that could be effecting the script?
Thanks
Simon

Handun
Handun
4 years ago

Hi Jos, I have used your script to map SharePoint drives in one of my client’s environments. However, every time when the scripts is executed, it asks for a Office 365 password two times. I haves used the version 3.08. After getting the password, even with several errors, script runs until the end, and maps the drives. However, users are complaining that they have to enter O365 password twice. I have used a Logon script to execute the PowerShell script. Please advise. Following is the error log. 07/03/2017 14:58:53 | INFO | —–07/03/2017 14:58:53 OneDriveMapper v3.08 – bookkeeper on TEST-WS03… Read more »

trackback

[…] OneDriveMapper […]

Mickael Selander
Mickael Selander
4 years ago

We just started to get an login promt seems to only accure on our Win7 machines, ADFS says wrong password or username but I can successfully login with SSO on the users machine but not in the script. anyone recieved anything simulare?

Tom
Tom
4 years ago

Hi Jos

The script is working perfectly for us, however if a user opens an Office file from the mapped drive and they haven’t signed in to Office 2016 they are prompted for their password. Strangely though if they close the prompt then the file does open.

From what I have read this is due to how Office works with WebDAV, but wanted to see if other people are having the same problem.

Thanks

Luke
4 years ago

Hi Jos, this script is amazing and I love it, however I regularly get an error “>AADSTS165000: Invalid Request: The request tokens do not match the user context.” which causes fallback mode.
That’s not a big problem, except that once signin in fallback mode is successful, a modal appears underneath every other open window titled “Are you sure you want to leave this page?” with “Message from webpage: null” and two buttons to either “Leave this page” or “Stay on this page.”

Is anybody else getting this?

Kevin De Schrijver
Kevin De Schrijver
4 years ago

Has anyone found a solution for the slow upload speeds towards OneDrive/Sharepoint using Windows Explorer? Already deactivated the “Automaticlly detect settings” in IE but still getting abysmall upload speeds

trackback

[…] OneDriveMapper […]

Márton Bacsó
Márton Bacsó
4 years ago

Dear Jos,

I have just upgraded the script from 2.38 to 2.43. Now it only works when I set “userLookupMode” to 4 and it still asks for my e-mail address in a pop-up window, although I have saved both my username and password into the script. 2.41 from TechNet gives me the same error message:

“A username was already specified in the script configuration: bacsom@thankaroly.hu
userLookupMode is set to 1 -> checking Active Directory UPN
Failed to lookup username, active directory connection failed, please change userLookupMode”

Your help would be greatly appriciated!

Trond
Trond
4 years ago

Jos, suddenly one computer got the error “userLookupMode is set to 3, but we failed to detect a proper username” in the log. While manually doing the lookup for SID and, username and SAM, everything seems normal, also the registry keys are in place. Here are the contents from HKLM Reg key: (Added a bunc of X’es) [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IdentityStore\Cache\S-1-12-1-2648678820-1127942705-2445130163-XXXXXXXXXXXX\IdentityCache\S-1-12-1-2648678820-1127942705-2445130163-XXXXXXXXXXXXXXXX] “UserName”=”guxxxxxxxx@xxxxxxxxxxxxxkk.no” “SAMName”=”XXXXXguXXXX” “DisplayName”=”guxxxxxxxx@xxxxxxxxxxxxxkk.no” “ProviderName”=”XXXXXX” “ProviderGUID”=”{XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXXX}” Also, while debugging, I tried to set username in the file, but that logic is not honored any more. It stills try to use the UserLookupMode. Delete that whole section: “switch($userLookupMode)” and where able to use username.… Read more »

trackback

[…] OneDriveMapper […]

Nico
Nico
1 hour ago

Hi, We’ve been encountering some issues with V4 of the script. Sometimes the pop up says ‘Done’ however the converged drive has no links to Sharepoint in them. Just a blanked map drive, this happens sometimes but not always. We’ve since moved over to new V5 script which replaces IE with Edge and I am now encountering the same problem but it happens all the time. The log reports the following: 07/26/2021 14:42:47 | ERROR | Failed to load Edge driver, cannot continue. error details: Exception calling “.ctor” with “1” argument(s): “Cannot start the driver service on http://localhost:50241/” We’re running the… Read more »

Ricardo Fonseca
Ricardo Fonseca
27 days ago

I cannot run OneDriveMapper 5.0 on remnote drive.

the script download files correctly but not run

06/29/2021 10:34:05 | ERROR | Failed to load Edge driver, cannot continue. error details: Exception calling “CreateDefaultService” with “2” argument(s): “The file Microsoft.PowerShell.Core\FileSystem::\\DOMAIN\msedgedriver.exe does not exist. The driver can be downloaded at http://go.microsoft.com/fwlink/?LinkId=619687

Joe
Joe
1 month ago

V5 is giving following error: (Is that a know issue?)

ERROR | Failed to load Edge driver, cannot continue. error details: Method invocation failed because [OpenQA.Selenium.E
dge.EdgeDriver] does not contain a method named ‘new’.

Eric
Eric
1 month ago

Hi, we have been relying on this awesome script for some time for citrix environment. As we know Microsoft mentioned that start from beginning August 17, 2021, the remaining Microsoft 365 apps and services will no longer support IE 11 (https://techcommunity.microsoft.com/t5/microsoft-365-blog/microsoft-365-apps-say-farewell-to-internet-explorer-11-and/ba-p/1591666). Should it affect this script functionality ?

Reece
Reece
3 months ago

Hi, Upgrading to the v4 script. Trying it out on a SSO account and an account that has been signed in not using SSO, keep getting the message ‘attempting to detect username – url – waited for x seconds’ then a line after you’re already logged in. This repeats then a box appears, we can’t detect your username thanks for any help INFO | —–04/21/2021 09:23:04 OneDriveMapper v4.07 – starting—– INFO | Script elevation level: User INFO | Set TLS protocol version to prefer v1.2 INFO | You are rholland running on Windows 10 with IE 11 and Powershell version… Read more »

Last edited 3 months ago by Reece
Simon
Simon
3 months ago

Hi I am running into some problems with the script. Previously it worked just fine, but recently it stopped working. When running the script, everything works fine right until you are prompted for a login. After entering my credentials, it just logs in to SharePoint and never closes the IE window. Log: 04/20/2021 09:10:07 | INFO | Script elevation level: User 04/20/2021 09:10:07 | INFO | Set TLS protocol version to prefer v1.2 04/20/2021 09:10:07 | INFO | You are sv running on Windows 10 with IE 11 and Powershell version 5 04/20/2021 09:10:07 | INFO | loading interop service… Read more »

Giovanni
Giovanni
3 months ago

How can I prevent the authentication dialog from appearing if my credentials are safely stored in Credential Manager and I want to use the modul Credential manager?

Tom
Tom
3 months ago

Hi

I am having some problems with Azure AD connect SSO.

The SSO is working, but the drive doesn’t map and I get the error ‘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’.

I have checked the Internet Explorer settings and all the sharepoint.com domains are in trusted sites.

Any help would be greatly appreciated.

Thanks

Adrien
Adrien
3 months ago

Hello
I am trying to switch from version 3 to version 4 of onedrive mapper
I activated the $ useAzAdConnectSSO but I have the popup to identify myself.
There is Internet Explorer on PCs.
Do you have an idea ?
Thank you

Jonas Hellström
Jonas Hellström
4 months ago

Has anyone tried this with Azure Seamless SSO?

We can’t get it to work.

martin
5 months ago

After the lastest update to Edge, the script open edge insted of ie and then it fails
i found a workaround by disabeling ie to open edge, but not the perfect solution

will there be an update to the scipt ?

Nard
Nard
5 months ago

Hi Jos,
Are you planning to change Onedrivemapper to continue working after 27-08-2021, when M365 websites stop supporting IE11?

Maikel van der Heyden
Maikel van der Heyden
5 months ago

Hello i have an issue, we use the onedrivemapper but we have in shared documents double space and singel spaces, is there some way to get both of them in the converged drive, i hope you could help me.

it works only now when i choose 1 of it: with double or singel spaces

Ralph Montgomery
6 months ago

Good Day! We have been using v3.20 successfully for about a year. We are not attempting to transition to v4, but any converged SharePoint mappings are unclickable (links do not work). v3.2, we do not have this issue, only with v4.0.

Any thoughts?

Screen Shot 2021-01-11 at 17.34.19.png
Sebastian
Sebastian
7 months ago

Hello everybody,

I use version 4.07 in an RDS-Farm with 4 servers and UserProfileDisks. I only use the function of integrating a Sharepoint as a drive with a letter. However, each time the user logs on to the RDS-Farm, they are asked for a password when the script runs.

What i have already done is to specify the sharepoint site as a trusted site and also tried the KB943280 to solve the problem.

Scott
Scott
7 months ago

Started to receive the following error. “check if the URL is valid. Error: System.Management.Automation.RemoteException System error 59 has occurred. System.Management.Automation.RemoteException An unexpected network error occurred. System.Management.Automation.RemoteException”.

I am using v3.21, which has worked flawlessly until today. I have not applied any windows updates or changed GPO settings.

To try to remedy, I have tried to use v4.07, but it says that I’m already logged in (doesn’t prompt me for password) and still gives me the same exact error. What should I look for? I have removed all cache, cleared cookies.

Johnmy Rivera
Johnmy Rivera
7 months ago

How do I get the script to only map the drive if the user is part of the target security group?

Right now the script maps all the sites under desired mappings.

Ralph Montgomery
7 months ago

Love the script; using the lightweight version (4.07) appears to have solved the issue of mapping an F3 user’s OneDrive, but has dropped support for automapping the Teams/SharePoint Favorites functionality (present in v3.20); something we would like to pursue. What functions can we pull back into a customized version to add that back?

Karen
8 months ago

Hi,
Version 4 on Domain Joined devices not recognizing User UPN and asking to login everytime when startup scrip runs.

For old version scrip $userLookupMode = 4 works without login process.

Any idea how we can add $userLookupMode = 4 on V4 script ?

Robert
Robert
8 months ago

I’m trying to use the 4.0.7 version. It’s working only i have the problem with automatic connect all my favorite teams. It wont work what i’m trying. Is there someone with a solution? Its about 3000 teams for different users.

mikel
mikel
9 months ago

Hi! I am getting the 224 error. I followed some advices in previous comments but I can’t manage to solve the problem. This is the log. Thanks in advance!!! 10/07/2020 17:28:26 | INFO | —–10/07/2020 17:28:26 OneDriveMapper v4.02 – user on SKV00021 starting—– 10/07/2020 17:28:26 | INFO | Script elevation level: User 10/07/2020 17:28:26 | INFO | Set TLS protocol version to prefer v1.2 10/07/2020 17:28:26 | INFO | You are user running on Windows 10 with IE 11 and Powershell version 5 10/07/2020 17:28:28 | INFO | NOTICE: IE Security zones ambiguous – checking both computer and user 10/07/2020… Read more »

Kaushik Patel
Kaushik Patel
9 months ago

Hi All,

Im getting the following error
Error deteched while following fmHF redirect, check the FAQ for help
fallback mode is enabled, and login failed. attempting IE auth mode…

does anyone know how to fix this.

jay
jay
9 months ago

It mapped the drive for me. I got to the point where it says “sleeping for 39 seconds”. It froze after that.
It also says “autoprotectmode is set to true, reverting to old settings” not sure what that means. Is it going to reset my KFM settings? I have my Documents, Pictures and Desktop syncing to OneDrive.

Last edited 9 months ago by jay
martin
10 months ago

i’ve got some problems since monday
the mapped drives look empty
if we update the folder it sometimes comes back
the folder are also working extremly slow

RICHIOUD
RICHIOUD
10 months ago

Hello Jos,

This day i speak with Microsoft about slowness and problem with displaying Folders and Files in mapped drives. They said me : “IE will be shut down on November 30”, after that can we continue to use mapped drives ?

Cordially,

RICHIOUD Jérémy

AEmberson
AEmberson
10 months ago

New version 4.3 the first time is asking my users to sign in via the internet and brining up the MS sign in page. Never used to do this with V3. Any ideas?

Joshua
Joshua
10 months ago

Hi Jos,

First of all, thank you so much! This script is amazing! It is working with Server 2019 with Citrix 2006 MSC. You are the best!

DawnM
DawnM
10 months ago

I recently mapped my OneDrive using the latest, v4, of the mapper. Now when I try to refresh in IE, it’s not refreshing the mapped folder in File Explorer. I still get the “an error occurred while reconnecting…” message. I didn’t have an issue with refreshing through IE when an older version of the mapping script had been used. How can I resolve this without re-mapping my drive every time it disconnects? Thanks.

Massimo
Massimo
1 year ago

Does version 4 works if Internet Explorer is not installed?

Version 3 did, but now I get the error “Mapping cannot continue because we could not start your browser”

OnedrivemapperErrorNoIE.png
paul Digi
paul Digi
1 year ago

I have a problem after changing the password of my mail account i can’t login. Where does onedrivemapper store the login

Johnathan Joynson
Johnathan Joynson
1 year ago

Hi, I can use the mapper to map one drive, but if I to do two I get: INFO | Initiating Sharepoint session with: https://xxx.sharepoint.com/sites/Shared%20Documents/Forms/AllItems.aspx/xxx INFO | Retrieving Sharepoint cookie step 1… ERROR | Failed to retrieve cookie for SpO, will not map this site: Exception calling “GetResponse” with “0” argument(s): “The remote server returned an error: (404) Not Found.” INFO | Initiating Sharepoint session with: https://xxx.sharepoint.com/sites/Shared%20Documents/Forms/AllItems.aspx/Account_Share INFO | Retrieving Sharepoint cookie step 1… ERROR | Failed to retrieve cookie for SpO, will not map this site: Exception calling “GetResponse” with “0” argument(s): “The remote server returned an error: (404)… Read more »

Leo
Leo
1 year ago

Hello

I have a question
We using MFA coming from our adfs and when i go to office365 then i get mfa that works good
but if a run the onedrive script 3.21 then i get no popup to put MFA code to connect with office 365 onedrive map

Can anybody help me to put my in the right direction ?

Thanks for the help

Ziad Mustafa
Ziad Mustafa
1 year ago

Hello,

I tried running the script many times with no success. I tried tweaking/troubleshooting it but I keep getting the following:

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 or switch to Native mode. The element i0116 was not found (2) or had no tagName
ERROR | IE auth login mode failed, aborting script

Any ideas, thoughts, and/or input would be greatly appreciated!!!

Thanks,

weba
weba
1 year ago

Lately seen random issues where the script does not work and prompts user for an password. First error (of many) is this: Failed to find signin element type 1 on Office 365 login page. Error details: The element otherTileText was not found (2) or had no tagName

This only appears once in a while, for now at least…

Magne Stenwig
Magne Stenwig
1 year ago

Thank you for a fantastic script!

I am trying to map to a Sharepoint-site where I am a guest. I have the permissions needed to log on as a guest via web, but I have not been able to use Onedrivemapper to map the doclib.

Do you know if this is possible?

Best Regards
Magne

sven
sven
1 year ago

With Server2016 i had this error:

282/5000
System error 224 occurred.
The access was denied. Before you open files in this location, you must first add the site to the list of trusted sites. Then you need to access the website and select the option to automatically log in.

But when i check with powershell it is in :
ttps://ictedubs.onmicrosoft.com : 1
https://autologon.microsoftazuread-sso.com : 1
https://aadg.windows.net.nsatc.net : 1
https://*.microsoftonline.com : 2
https://ictedubs-my.sharepoint.com : 2
https://ictedubs.sharepoint.com : 2
\\ictedubs-my.sharepoint.com@SSL\DavWWWRoot\personal\* : 2
\\ictedubs-my.sharepoint.com@SSL\* : 2

Any Idea?

Thanks Sven

Jason Connors
Jason Connors
1 year ago

Hello,

Is anyone still actively using this script? If not,anyone still following this thread that has a recommendation?

Thank You,

chaddie
chaddie
1 year ago

OneDriveMapper stopped working recently. Has anyone figured out a fix for this?

Richard
Richard
1 year ago

Onedrivemapper only maps drives when you manually ‘open in explorer’ the onedrive/sharepoint library. Is this by design or could it be as i am used Okta as SSO. Can this be scripted to automatically open in explorer.

MdB
MdB
1 year ago

After spending the last few days troubleshooting the error beneath, i checked if i was using the most recent version of the script (3.20). After downloading the script again i noticed the version is 3.19. The personal OneDrive folder was being mapped fine, any subsite returned this error: 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. I tried the following in version 3.20: – Added GPO with Logon option ‘internet explorer… Read more »

Martin
Martin
1 year ago

i get error 53 site not found, but only on some computers
if i run the same script on another computer i works

Reece
Reece
2 years ago

Hi, we are looking to enable SSO but not azure domain everything. Just SSO account. will this work with the mapper under azure? we want students to log in, script to run and pick up the office 365 areas we link to it

https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sso-quick-start

thanks!

Mark
Mark
2 years ago

Hello,
I really like what you have accomplished with your powershell script and drive mapper code.

Within our organization, users do not tend to log off, so what happens is that the authentication cookie expires.

To get around this problem, I would like to schedule a task to run the OneDriveMapper every 24 hours.

However, I cannot get the script to execute properly through the task scheduler. Task scheduler does not like mapping drives.

Do you know of a way to resolve this issue?

Thanks!

Mark

Mike
Mike
2 years ago

We have been using this successfully for years. We have found that the connection drops when trying to open a PDF through the mapped drive. Any throughts on what i need to do to get this fixed?

german
german
2 years ago

Hi Jos, Is it possible to add on the script the option to map the “Shared with me” to a drive letter?

Nathan
Nathan
2 years ago

The mapping works fine but folder redirection always throws this error;
INFO | Redirecting Desktop to o:\Desktop
ERROR | Failed to redirect to : Error redirecting Desktop. Return code -2147024891 = Access is denied
INFO | Redirecting MyDocuments to o:\Documents
ERROR | Failed to redirect to : Error redirecting Documents. Return code -2147024891 = Access is denied
INFO | Redirecting MyPictures to o:\My Pictures
ERROR | Failed to redirect to : Error redirecting Pictures. Return code -2147024891 = Access is denied

It creates the empty folders on O drive but doesn’t redirect. Version 3.20 . Any ideas?

Vijay
Vijay
2 years ago

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?

Antonio
2 years ago

Hello Jos/ Everyone,
thank you for this great script… as many users i had a lots of issue if deployed with GPO.
Tried several ways but none of them was stable. we sorted out this issue by developing a simple .exe that pick up the script from an https url and execute it.

BR,
Antonio

Gopinath Ganesan
Gopinath Ganesan
2 years ago

Hello Jos/ Everyone,

Im getting the following error message suddenly and it stopped working, it was working very smooth, Im using OKTA single sign on for Office 365 federation. Any kind of help greatly appreciated.

05/28/2019 17:04:16 | ERROR | Failed to find the correct controls at https://“” to log in by script, check your browser and proxy settings or check for an update of this script or switch to Native mode. The element i0116 was not found (2) or had no tagName
05/28/2019 17:04:16 | ERROR | IE auth login mode failed, aborting script

Thank you,
Gopinath Ganesan

Samer Sultan
2 years ago

What line in the code do we add trusted sites to?

Curtsen
Curtsen
2 years ago

i keep getting this error in version 3.20
tried different pc and profile but same error
ERROR | Error detected while following id_token redirect, check the FAQ for help
INFO | Mapping target: \\jtlifting.sharepoint.com@SSL\DavWWWRoot\sites\Kontor\Delte dokumenter
ERROR | failed to contact K: after mapping it to \\jtlifting.sharepoint.com@SSL\DavWWWRoot\sites\Kontor\Delte dokumenter, check if the URL is valid. Error:
Systemfejlen 224 opstod.
Adgang n‘gtet. Inden du †bner filer p† denne placering, skal du f›je webstedet til listen over websteder, du har tillid til, g† til webstedet og v‘lge at logge p† automatisk.

Rebecca DiFede
Rebecca DiFede
2 years ago

I’ve been using OneDriveMapper for awhile with no issues, but recently (last month or so) it stopped mapping drives when users are logged into a VDI. The script runs, and it says that the drives have mapped successfully, but when you open the file explorer they’re not there. We’re using Citrix to access the VDI’s through a netscaler, and our Citrix server is on Windows 2016. Has anyone else experienced this?

Greg
Greg
2 years ago

The most recent version (3.21) doesn’t seem to work at all. It will not even attempt to log in. I also notice that the Team Site line is now removed, which makes me think this and the malfunction are not coincidental?

Mohammad Shaon
Mohammad Shaon
2 years ago

One driver mapper is not working.. i am not sure what is happening.
once the login to the office 365 was successful, following error was showing

Info Attempting to get the username at https://nygard-my.sharepoint.com/_layouts/15/MySite.aspx?MySiteRedirect=AllDocuments……..(run that line up to 62 sec)

Then showed log in failed……………please help me in this case

Andrew
Andrew
2 years ago

This script is still working great. Unfortunately we may have to start using a proxy server. I understand that turning off automatic proxy detection helps to speed up WebDAV connections, but will this script work properly through a proxy with the settings specified by, for example, Group Policy?

Tyson
Tyson
2 years ago

Jos,

Is this supposed to act as a full redirection?

One of my users does not see real-time when another user saves a document to the same SharePoint site. Additionally, many of my users cannot see any files in a particular folder. This folder does have hundreds, maybe even thousands of files. Do I need to increase the size limit or should they be able to see the files?

SVH
SVH
2 years ago

Hi Guys

Firstly thanks for a great script,, one issue is if i run the script manually it work but when running via gpo wont work,,, old script use to run fine have updated gpo to point to new script and nothing,, any pointers thanks in advance

Mohammad Shaon
Mohammad Shaon
2 years ago

I am having this issue while I am running this script

Method invocation failed because [System.Int32] does not contain a method named ‘IndexOf’.
At C:\Users\MOS\Downloads\v3.19.ps1:2078 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:\Users\MOS\Downloads\v3.19.ps1:621 char:13
+ $request = [System.Net.WebRequest]::Create($url)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UriFormatException

Paul Clarke
Paul Clarke
2 years ago

Hi

I work in a school and we have been using your script just fine.

I have built a new windows image with Windows 10 1809 x64.

Exactly the same programs as our previous build of 1803 x64.

The script (v3.19) is now failing on these machines.

ERROR: Failed to set test cookie, script will fail: Exception calling “SetWinINETCookieString” with “3” argument(s): “Exception setting cookie: Win32 Error code=0”

So obviously the script then fails with error 224 later on.

I have set $autoResetIE to True

Trusted sites are all set up via GPO.

Dirk
Dirk
2 years ago

Great script, helps a lot!
I get a warning : Maximum file upload size is set to 48 MB
Can this changed somewhere?

Regards
Dirk

Andreas Olofsson
Andreas Olofsson
2 years ago

How should I configure the script when using conditional Access and do not require MFA for Azure Joined/ workplace joined devices.

The script works fine without the conditional access rule that requires MFA on not Azure AD joined devices.

On line 1848 in v. 3.19 a verification of the response Uri is to “https://login.microsoftonline.com” but the response is rederected to “https://device.login.microsoftonline.com”. It looks lite the script does not cope with this scenario.

Does anyone have any clue?

Johan
Johan
2 years ago

Hi, The script runs perfectly with no errors during logon in our Citrix environment. However,I am having an issue with the mapped drive being lost mid session after an unspecified amount of time. When this happens you can see the drive mapped in explorer, but with no bar to show disk usage, it says FAT32 formatted drive. When you try to open in you get a message saying Access denied, you need to add the location to your trusted sites before opening. I have seen people having this issue while running the script but nobody else seems to have this… Read more »

Hendra
Hendra
2 years ago

Hi Jos! thanks for the awesome scripts. v3.19 is working nicely. So far I monitor, the token will be expired within a day (assuming users do not logout from machine). I’m wondering if there any way we can do to keep/extend the token lifespan ?

Jon
Jon
2 years ago

Script seems to not work if you have configured AAD Terms of use (https://docs.microsoft.com/en-us/azure/active-directory/governance/active-directory-tou) that’s targeted at SharePoint Online. It does not matter if user has given consent before running script. Here is the log when TOU is applied: … INFO | Login succeeded INFO | Retrieving Onedrive for Business cookie step 1… INFO | Retrieving Sharepoint cookie step 2 at https://login.microsoftonline.com:443/federation/redirecttoexternalprovider INFO | Waited for 0 seconds for O4b auto provisioning… INFO | Waited for 10 seconds for O4b auto provisioning… … INFO | Waited for 180 seconds for O4b auto provisioning… ERROR | Failed to auto provision onedrive… Read more »

Randy B.
Randy B.
2 years ago

OneDrive Mapper not working with MFA enabled? SO I am testing MFA with Azure P1 and third party product. Now my One Drive mapper is no longer working.. the third party app support is telling me the one drive script doesn’t support “modern Authentication” whatever that is.. anyway I think I can get around it if I can figure out how to force the one drive mapper script to use a service account instead of using my account.. any tips or suggestions on how to modify it so that will work?

Tim
Tim
2 years ago

I have an issue for some machines whereby the script needs to run every day, otherwise the mapped drives are not accessible – the drives no longer connect and show as ‘FAT’ for some reason!

The drives are using letters on the far end of the alphabet so can’t see there being any conflict with any local devices.

Anyone know of a reason why this would happen?

Microsoft 365, Azure, Automation & Code

2.1K
0
Would love your thoughts, please comment.x
()
x