Share via

Any script to force Onedrive sync?

Leandro Páez 0 Reputation points
2026-02-26T10:45:42.7966667+00:00

Im tired, at my job pc, with Windows 10 pro, but configured my personal Onedrive, reach some time it no sync then I need pause then resume. And pause button ask how many time I want pause!

Or if no script, there is an option so Pause no ask how many time want pause?

Microsoft 365 and Office | OneDrive | For home | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumit D - IA 160K Reputation points Independent Advisor
    2026-02-26T11:32:58.8433333+00:00

    Hi,

    There is no option to remove the “Pause for 2 / 8 / 24 hours” prompt. OneDrive is designed to always ask the duration. It cannot be disabled via settings or registry.

    Regarding the issue, have you tried Resetting Onedrive?

    Press Windows+R keys on the keyboard, or Right-click Start on the Taskbar and choose Run.

    Type the command below:

    Press Enter.

    %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
    

    If OneDrive doesn’t restart automatically, run:

    %localappdata%\Microsoft\OneDrive\onedrive.exe
    
    
    

    I hope this information helps. If you have any more questions, don't hesitate to reach out.

    Otherwise, please take a moment to rate the answer. Wishing you good luck!

    0 comments No comments

  2. Q&A Assist
    2026-02-26T10:45:53.63+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    There is no supported script or setting in OneDrive to “force” a sync beyond what the client already does, and there is no option to change how the Pause dialog works or to remove the time selection prompt.

    The supported way to “kick” sync when it seems stuck is exactly what is already being done: pause and then resume sync from the OneDrive icon in the notification area. Microsoft documentation explicitly recommends Pause/Resume as the way to get sync going again when it appears stuck or shows “Processing changes” for a long time.

    On Windows, the steps are:

    1. Right‑click the white or blue OneDrive cloud icon in the taskbar notification area.
    2. Select Pause syncing and choose 2, 8, or 24 hours.
    3. Right‑click the icon again and select Resume syncing.

    This behavior (being asked to choose 2/8/24 hours) is by design and cannot be changed via settings.

    If sync frequently stops or gets stuck, the recommended approach is to troubleshoot the underlying sync issue rather than trying to force sync with a script. For example, Microsoft suggests:

    • Using Pause and Resume when sync is stuck or showing “Processing 0KB of xMB”.
    • Checking that too many files are not being synced and reducing the number of items if necessary.

    References:

    0 comments No comments

Your answer

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