How to Map OneDrive for Business to a Drive Letter in Windows

Table of Contents

With the introduction of Windows 11, OneDrive has become a more permanent part of the OS, where the OneDrive files are shown directly in the Start Menu. But, Microsoft has pushed a recent update for Windows that makes it harder to map OneDrive to a particular drive letter on your system. Don’t worry. There are multiple ways that you can still use to map the OneDrive to a designated drive letter on your system.

Map OneDrive for Business to a drive letter in Windows

Method 1: Map OneDrive for Business as a local drive

1. Determining the path of the OneDrive for Business. Hold the key while right click on the OneDrive icon to bring up the context menu then elect Copy as path.

How to Map OneDrive for Business to a Drive Letter in Windows

In this case, below is the location of my OneDrive for Business folder.

"C:\Users\admin\OneDrive - Bon Ben"

2. Once you are done, let’s open a Command Prompt or PowerShell window then execute the following command:

Note

Do not open Command Prompt or PowerShell as administrator. Let’s open CMD or PowerShell as normal user.

Don’t forget replacing the drive letter with the drive letter you want to assign to the newly mapped OneDrive for Business. Remember to put the address of the folder between the quotation marks in the command.

subst P: "C:\Users\admin\OneDrive - Bon Ben"
How to Map OneDrive for Business to a Drive Letter in Windows

That’s it! Now, you can close the Command Prompt and check the File Explorer. You will see the OneDrive has appeared as the P drive on your system.

How to Map OneDrive for Business to a Drive Letter in Windows

Method 2: Map OneDrive for Business as a network drive

If the above method doesn’t work, you can add OneDrive for Business as a network drive on your system. It will work as well.

Note

This feature doesn’t work in Google Chrome, Mozilla Firefox, or on the Mac platform. You must use Internet Explorer to login and map a network drive.

1. Open Microsoft Edge then sign-in into https://onedrive.com.

2. Sign in with your email address and password. Once you have logged in, go to the address bar and copy the address up to the forward slash after your_domain_name/.

How to Map OneDrive for Business to a Drive Letter in Windows

You should have copied something like this (but with your ID): 

https://bbguides-my.sharepoint.com/personal/tonny_bonben_me/

3. Next, you need add credential into Internet Explorer. To do it, let’s right click on the Windows Start icon then select Windows PowerShell (Admin).

How to Map OneDrive for Business to a Drive Letter in Windows

4. Copy and run the commands below to login into OneDrive for Business using Internet Explorer browser. Don’t forget change the $Path by your OneDrive for Business link.

$Path = "https://bbguides-my.sharepoint.com/personal/tonny_bonben_me/"
Start-Process -File "C:\Program Files\Internet Explorer\iexplore.exe" -arg $Path

###Add trusted site into Internet Options
Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-Location ZoneMap\Domains
New-Item *.sharepoint.com
Set-Location *.sharepoint.com
New-ItemProperty . -Name https -Value 2 -Type DWORD
How to Map OneDrive for Business to a Drive Letter in Windows

5. Sign in with your email address and password. Then don’t forget check the box that says, Don’t show this again and click Yes button in the Stay signed in window.

How to Map OneDrive for Business to a Drive Letter in Windows

6. One done, you would get this screen, just simple close Internet Explorer. We don’t need it anymore.

How to Map OneDrive for Business to a Drive Letter in Windows

7. Open the File Explorer on your system. In the File Explorer window, click on Map network drive to map OneDrive into your Windows.

How to Map OneDrive for Business to a Drive Letter in Windows

8. In the folder box, paste the URL from your clipboard, and adding the word Documents/ to the end.

https://bbguides-my.sharepoint.com/personal/tonny_bonben_me/Documents/
How to Map OneDrive for Business to a Drive Letter in Windows

9. OneDrive will be opened in a new File Explorer window. You have successfully mapped OneDrive for Business as a drive on your system.

How to Map OneDrive for Business to a Drive Letter in Windows

10. As you have added OneDrive as a new network drive. You can rename it to anything you prefer.

How to Map OneDrive for Business to a Drive Letter in Windows

Comments (2)

  1. Bonjour et j’ai bien réussi à rajouter ce lecteur disque en fait il se calque avec le lecteur C: avec la même dimension le meme espace donc il stock sur C: d’abord et non pas sur le cloud OneDrive BUSINESS, j’aimerais savoir comment on peut-on le supprimer parce que je n’arrive plus à le supprimer comment peut-on faire

    Reply

Leave a Comment

Required fields are marked *