Recently in a post, we saw how to map OneDrive as a Network Drive on Windows 11/10. Today we will show you how to easily map OneDrive for Business as a Network Drive using a tool called OneDriveMapper, which lets you create virtual drives for local as well as cloud directories. This PowerShell script lets you map a network drive to your OneDrive for Business account. Mapping OneDrive for Business is comparatively difficult and may require you to go through some advanced steps.
Map OneDrive for Business as a Network Drive
You might wonder why there is a need to map OneDrive as a network drive when you can sync it instead. There are many scenarios where synchronization is not necessary. For example, in a multi-user environment, a user may have to sync and re-sync the folders again to obtain the latest file. In a mapping scenario, you access the file directly from its server. A mapped drive requires a more stable internet connection, but it is definitely worth it.
Although the OneDrive for Business client is available to download, it will only sync your files. You might want to map it as a network drive, so check out this wonderful PowerShell script written by Jos Lieben.
OneDriveMapper PowerShell Script
OneDriveMapper is a PowerShell script that can automate the entire process of mapping OneDrive for Business to a network drive. The script has evolved over the versions and acquired many useful features.
To get started, follow the Developer’s instructions to change a few values in the script. Once you’ve modified your entries, you can run the script to map your OneDrive for Business as a network drive.
The script can run at login on or demand and connect seamlessly without any user interaction. You must enter your password only once, and you will be automatically logged in every time. You can customize the drive letter and label, and there are many other useful features available.
Features:
- Detects changed usernames/URL’s automatically
- Can map drives inside Azure RemoteApps
- Can redirect My Documents to Onedrive for Business
- SSO for MDM Intune AzureAD W10 devices
- No Sync, online WebDav connection
- Connects seamlessly without user interaction
- Prompts for user password if no ADFS used
- Runs at login or on-demand
- Maps your OneDrive for Business to a local drive letter
- On-Demand Provisioning of the OneDrive MySite
- Detailed and configurable logging
- Also maps Sharepoint Document libraries directly
- Can also map based on security groups
- Automatically disables and re-enables Protected Mode in IE
- Sets a customizable label for the Network drives
- Can use custom library names
- Can also run on non-domain joined machines or Workplace-joined machines
- Can be deployed as logon script through Intune
- Can easily run from a shortcut as well.
The main question remains: how do configure the script for your OneDrive for Business account? The script’s web page covers all the steps to set up and run the script. Some parameters need to be changed with your values. Once you finish them, you are ready to go and execute the script on your computer.
You can download the OneDriveMapper PowerShell script from here.
Set up sync for OneDrive for Business
We’ve covered the steps required to map OneDrive for Business as a network drive and set up a synchronization setup just in case. Windows 10 comes preloaded with OneDrive client, so to set up sync for OneDrive for Business, all you need to do is log in with your business account on the desktop client. If you’ve already logged in to OneDrive with your personal account then follow these steps:
- Right-click the OneDrive icon from the system tray and select ‘Settings’.
- Click on ‘Add an account’.
- A familiar sign-in screen would pop up, and you can log in with your business account.
We hope this post will help you successfully map OneDrive for Business as a Network Drive on Windows 10.
TIP: Visual Subst is a free tool that lets you easily create Virtual Drives for your Folders & map Cloud Storage as Virtual Drives.