

The scripts work by automating sign in through Internet Explorer and then using commands like net use to create a mapped drive. The community has created some scripts you can use and change to your needs. However, mapping as network drive is not recommended where use Sync instead of mapping a drive.

You can automate this process too with Powershell scripts. From the description provided, as your requirement is to map OneDrive for Business as Network Drive, based on my search you can achieve it using PowerShell script. Open your File Explorer and check the folders under OneDrive - Company Name. Microsoft has an article on how to map OneDrive for Business to a network drive. Go to OneDrive Online in the browser> Shared tab> Shared with me> Open the Folder and click on the Sync button Now you can find those folders in File Explorer. But, its an "online" solution it does not provide offline access. I assume you are referring to OneDrive for Business and not OneDrive (consumer) as you mentioned Office 365 and SharePoint? You can make OneDrive for Business act like a remote file share by creating a mapped network drive.
