Installing OneDrive for custom Windows 11 image

Adrian Evangelista 56 Reputation points
2023-07-13T08:39:44.7233333+00:00

I am trying to prepare a custom Windows 11 build for new devices in our organisation as we are not quite ready for Autopilot.

I am having some difficulty setting up OneDrive for the new devices. Previously, with our Windows 10 21H2 build we would install the software (ie. run OneDriveSetup.exe - double click to run as normal, as the temp user). We do have Office 365 installed using the ODT method but have OneDrive ecluded (as this ony sets up Personal). After running sysprep, and when the new user enrolls the device (AAD joined) we have found that the OneDrive is no longer installed. In addition, the Appx packages we removed before sysprep are now reinstalled (eg. Teams - we already have Teams work/school, but now have 2 after sysprep).

This was not an issue for Windows 10.

How do I install OneDrive on the device so that it is there for the new user when they login?

Note, each device is assigned to one user, who are local admins to that device. We are currently using WinPE, and have tried adding the command (remove appx and install OneDriveSetup.exe /silent) in the SetupComplete.cmd, but did not install.

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,311 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenXu-MSFT 23,741 Reputation points Microsoft Vendor
    2023-07-14T06:57:58.4733333+00:00

    Hi @adr,

    To install OneDrive on a custom Windows 11 build that will be used by different users, you should install it in per-machine mode. This article instructs how to install OneDrive in per-machine mode:


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.