OnedriveMapper FAQ


Debugging and support

Due to the high volume of emails and messages, I can’t always answer all of them and ask you to do your own research / best effort first. If you have issues, read through the comments and do a google / blog search and carefully examine the log in %appdata% or get a product with support.

If that doesn’t help and you need more help, download Fiddler and create a .saz recording of the issue make sure you enable SSL decrypting in the telerik options tab, it’ll install a certificate locally if this fails the log is useless. If you use ADFS, read below on how to use Fiddler with ADFS. Send that, your .ps1 file (with the configured params) and the .log file from %appdata% to me.

I cannot offer any guarantees but if i have time, I’ll try to help you out.

What about Cryptolockers?

As you’re creating a drivemap, the data is easy to find for ransomware, and can thus be encrypted. But your data is actually far safer than on traditional fileshares, because Sharepoint and Onedrive have version control. The encryption will trigger a new file version, meaning your RPO is 0, no data is lost! Restoring a backup is more work and causes dataloss. Oh, and version control is enabled by default 🙂

How do I run the script from a shortcut?

Read this post

How do I run the script from a GPO?

First off, do not run it as an embedded powershell script. Add it under ‘scripts’ as a normal script with commandline/name:


Then the arguments or parameters you should specify are:

-ExecutionPolicy ByPass -WindowStyle Hidden -File <PATH TO OnedriveMapper_v2.33.ps1>

if you omit -WindowStyle Hidden the script will execute visibly. File HAS to be the last parameter.

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

I’m not sure about the cause, but this can be fixed by resetting Internet Explorer. The cookie is required for the WebDav client’s auth to O365.

How can I use an ADFS smartlink to speed things up?

An ADFS smartlink can significantly speed up your logon process and reduce complexity (so, less chance for errors). If you don’t know how to make an ADFS Smartlink, google it.

Make an ADFS smartlink to “https://{YOUR TENANT NAME}”, replace the tenant name with your tenant, example: “”

Test if it works by entering this smartlink in your browser, if you get signed in automatically to Onedrive for Business, set $adfsSmartLink in the script configuration to your smartlink. Remember that this only works if ADFS signs you in automatically (usually only on premises).

How do I troubleshoot native auth with ADFS?

You may have to disable Extended Protection or alternatively play with FiddlerScript as a workaround.

The ADFS detail logs will also show why a request fails. ADFS should either do SSO or forms-based auth, if you see a popup in IE this means ADFS is not configured properly. ADFS should also support TLS v1.2.


What about maximum file sizes?

The larger the file size, the less fluent the user experience will be.

Size Mode Browser based Drivemapping
<128MB Upload OK OK
<128MB Download OK OK
<512MB Upload OK OK
<512MB Download OK OK
<1GB Upload OK X
<1GB Download OK OK
<10GB Upload OK X
<10GB Download OK OK
>10GB X X X

If very large files are handled (>128MB), transfers may fail depending on bandwidth and if webdav settings have been tweaked. Testing has shown that files up to 512MB usually upload or download correctly if sufficient bandwidth is available, but the dialog displayed to the user often seems unresponsive or hangs at 1% or 99% for a long time, without failing or other feedback until it suddenly completes. This speed is almost completely dependant on the bandwidth between the session and Onedrive for Business (microsoft cloud).


My mapped drive does not show the correct amount of free space, it copies my C-drive

This is by design and how Microsoft designed the WebDav client service in Windows, which is used to map the drive.

How do I map to an Office 365 Group?

Follow these instructions on how to get the Office 365 Group Webdav URL

My files are becoming locked

Assuming you already disabled WebDAV file locking support: Your library name probably contains one or more spaces, this can cause read/write issues, try mapping with a different number of spaces

I don’t use ADFS, my users have to enter their password each time them log in, why?

You’re probably using a tool (like RES?) to remove all drive mappings from the user profile upon logoff or logon. The script maps the drive persistently, so if your tooling doesn’t touch it, it’ll be back on a future logon, assuming you’re using Roaming Profiles. If the script does not detect the drive, it will go through the full mounting process.

Office applications keep prompting me for a password when I open word or excel files.

Try KB943280 to set WebDav to forward your credentials to the right server.

 My users immediately see an error, and I notice that the log shows this: Het ophalen van de COM-classfactory voor het onderdeel met CLSID {0002DF01-0000-0000-C000-000000000046} is mislukt vanwege de volgende fout: 80080005.

Something (probably RES) is blocking the script from starting an Internet Explorer COM object to fetch the login token for OneDrive.

Error 67, network name not found

Try ensuring that the WebDav client is functioning properly. The WebClient service on the server should be started. You can verify functionality by manually attempting to net use, if you see the same error, try to map the OneDrive folder using the map button in Internet Explorer when in your OneDrive. If this works, your WebDav client is the root cause.

Error 53, path not found

Remove the trailing / behind the sharepoint URL. Also, make sure there are no double spaces in the library name, and that the library name is 100% sure correct (try manually mapping it and checking net use)

My Office 2013 files are getting locked, and won’t unlock

The WebDav client has a locking mechanism, if this is enabled, in some setups you may experience permanently locked files. You can disable the WebDav locking mechanism by setting this registry key to 0 (False):


An unexpected error is keeping you from copying the folder. If you continue to receive this error, you can use the error code to search for help with this problem.
Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved.
the WebDav client’s file size limit is lower than the file you’re trying to access. You can adjust it using this kb
Browsing directories is very slow on Windows 8 RTM and Windows 2012 RTM machines
This is a known bug in the WebClient, please install KB2782826, or KB2445570
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.
Ensure trusted sites are not misconfigured (wrongly entered wildcards, multiple overriding GPO’s etc) and check if wiping your cookies resolves the issue.
My C-Drive fills ups
The Windows builtin WebDav client’s cache may have filled up, this can be wiped with the following command:
del "C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\*.*" /q /f
After a few days of inactivity, my drive becomes disonnected and I have to rerun the script to connect it again
I’m getting prompted for passwords after a reboot on another machine.
Also by design, if you’re using password caching, this is encrypted using the machine key by default and thus only usable on the same machine for security.

If you’re still having problems, like error 224, try installing this KB from Microsoft:

Error when you open a SharePoint Document Library in Windows Explorer or map a network drive to the library after you install Internet Explorer 10

Leave a Reply

40 Comments on "OnedriveMapper FAQ"

newest oldest most voted
Notify of
Hey i am trying running your script but getting the following error due to new sign in experience: 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 ERROR | failed to contact K: after mapping it to \\\DavWWWRoot\sites\sitname\subsite\Shared Documents\Forms\AllItems.aspx, check if the URL is valid. 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.… Read more »
Patrick Coughlin
Guest–201 Has the “latest” version of the WebDav components I have found. It should have all the previous fixed rolled up.


Anyone know a fix to easily-digitally sign the script? I have the ExecutionPolicy in our environment set to RemoteSigned (for security).


Hi, I have the script working well but the powershell opens up for the students to see and not hidden and just the drive mapping in bottom corner. How can i hide the powershell script please as students are closing the script before it has completed and not getting the mappings and the really younger students don’t understand and keep closing the scripts. Please anyone know how to run the script hidden via GPO. Thanks

David Cramp

Hi, this looks like exactly what I’m looking for, however I can’t get it working 🙁 The log file looks like it runs fine, other than the fact there is no mapping. I have turned Debug on and set auth method to IE but the debug file in empty. Please could you advise / suggest how I may go about debugging any problems.
Thanks very much in advance for any help you can give.


Hi using the scripts in GPO and have added in the login under powershell scripts is this correct? How can i get the powershell to hide for the users? You mentioned do not run the script as an embedded powershell script. Not sure what you mean. Thanks inadvance

Scott Adams

Getting error 53 on clients that are RDP’ing into Server 2012 and Server 2016.

The script works flawlessly on clients logging into Windows 7, Windows 10, and RDP’ing into Server 2008 R2.


I do not see a “trailing /” in my script.

Richard Boocock


Please can you help me. We do not have ADFS and have created a script that that works great but on the first login by a user they get asked for a password 3 times and they get a message saying Mapping cannot continue because we could not log into Office 365 but it works correctly. On the second login it works great I have checked the logs and it says it could not find the password in the password cache.

Please can someone help.



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 »
Just figured I’d contribute a little here. .. I was able to get this working in my VDI enviornment after a few days of arguing with Microsoft about why it needs to work. Running Windows 7 VDI with most of the latest security updates/rollups. We are also ADFS with Azure AD sync for SSO. Had originally used “ie” as the authentication mechanism in the script, and was getting the 224 error. Based on alot of reading and research, downloaded and installed the Windows Management Framework 5.1 from MS ( so that Powershell was brought up to 5.1 (it was originally… Read more »
Jan Krajcik

Hi, we’ve got the script working and it is a great help. Unfortunately since implementing it our users are prompted to logon to SharePoint online every time they open Internet Explorer. First time after the reboot they even have to type in their email address. Is there any way to remember / keep the user signed in in IE please? We use ADFS SSO. Many Thanks, Jan.

Bill Hixon

It appears on Feb 1, 2018 Microsoft has dropped the old login. It also seems something else changed since I cannot get 3.12 or 3.13 to map. I constantly get Error 224 on Windows 10 using login method 6 with stored login/password. It successfully logs in, gets to the correct location, then gives error 224. Tried complete reset of IE with no joy.


A minor issue: when users move files between folders in their mapped OneDrive they get a Windows Security alert “These files might be harmful to your computer”. I’ve read that adding the network location to the intranet sites should fix this, but I can’t do that if the network location is already specified under “Trusted” locations, as it needs to be to run this script. Is there a OneDriveMapper suggestion to fix this?


Hi, we go through a proxy and didn’t feel comfortable allowing users through to large parts of Microsoft without authentication. I have added the line “$request.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials” below “$request.KeepAlive = $True” (line 330). This uses the logged in users credentials to go through the proxy and is working here for native authentication.


Hello All. I just setup a local GPO on my workstation for testing with a logon script. I am using the standard script, not the powershell script tab. The name is powershell.exe and the parameters are:
-ExecutionPolicy ByPass -WindowStyle Hidden -File
The script runs fine after logon, but the powershell window isn’t hidden. Any ideas?