maciejrebisz.com

IT

How to migrate OneDrive from per user to per machine with Intune – Mobile-First Cloud-First

maximios October 17, 2021

Onedrive for Business is not easy to handle on a device with multiple users, the normal install behavior on Windows is per user – so every user on the device will get all the binaries from OneDrive for Business install in there local user profile instead of per machine. The possibility is changed in Sync client build 19.043.0304.0003 or later – but the default behavior is still to install per user in the %localappdata% folder – when “migrating” to er machine OneDrive is installed in %ProgramFiles(x86)% so you only needs one set of binaries per machine.

Why is this a good idea :

  • OneDrive.exe will not be running from the user profile of the user
  • OneDrive.exe when is gets updated it will happens once per machine (So that in the future is it not possible that different user on the same device can be running different versions of OneDrive.exe)

Note: This feature is in preview

How to change OneDrive from user to device with Microsoft Intune:

Start the Microsoft 365 Device Management portal : https://devicemanagment.microsoft.com

  1. Click device Configuration
  2. Click PowerShell scripts
  3. Click Add

  1. Name: OneDrive per machine
  2. Script location : upload the script

Assign the Intune PowerShell script to your devices.

##################################################################################################

###################################################################################################

$url = "https://go.microsoft.com/fwlink/?linkid=2083517"
$output = "$ENV:temp" + '\OneDriveSetup.exe'
$O4BPath = "$ENV:localappdata" + 'Microsoft/OneDrive/OneDriveSetup.exe'

#write $O4BPath
#write $output

IF(Test-Path $output)
{

}
ELSE {
Invoke-WebRequest -Uri $url -OutFile $output
}

IF(!(Test-Path $O4BPath))
{
& "$output" + '/allusers'
}
ELSE {

}

Link to the script on github
Happy testing 🙂
Read more:
Install the sync client per machine (preview)

Related Posts

IT /

Intune – Windows device enrollment restrictions – Cloud First

IT /

How to add “hidden” Windows UWP to Windows Store for Business – Cloud First

IT /

Office 2016 Active Directory-Based activation – Cloud First

‹ Windows 10 – Private Store only with MDM policy – Mobile-First Cloud-First › How to use Windows Autopilot from Microsoft Store for Business(WMfB) – Mobile-First Cloud-First

Recent Posts

  • Intune – Windows device enrollment restrictions – Cloud First
  • How to add “hidden” Windows UWP to Windows Store for Business – Cloud First
  • Office 2016 Active Directory-Based activation – Cloud First
  • How to deploy Windows Local Experience Packs with Intune – Cloud First
  • Conditional Access for Outlook Web Access (OWA) – Cloud First

Recent Comments

No comments to show.

Archives

  • November 2025
  • October 2025
  • August 2025
  • July 2025
  • June 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • November 2024
  • September 2024
  • July 2024
  • June 2024
  • March 2024
  • December 2023
  • August 2023
  • June 2023
  • March 2023
  • February 2023
  • December 2022
  • September 2022
  • August 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • January 2022
  • December 2021
  • October 2021
  • September 2021
  • August 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • February 2020
  • January 2020
  • December 2019
  • October 2019
  • September 2019
  • June 2019
  • April 2019
  • March 2019
  • February 2019
  • March 2018
  • February 2018
  • December 2017
  • October 2017
  • August 2017

Categories

  • IT

Back to Top

© maciejrebisz.com 2026
Powered by WordPress • Themify WordPress Themes