Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > Help me pause OneDrive Sync with PowerShell
January 02
Help me pause OneDrive Sync with PowerShell

OneDrive and PowerShell. They remind me of that song, My Favorite Things. Though I’m not sure which I like more, PowerShell or whiskers on kittens. It’s a close call.

I write a lot of little PowerShell scripts to help me get through the day, and often those scripts fiddle with files that are being synced with OneDrive. In a few cases, if the file is large enough, my PowerShell script will fail because OneDrive will lock the file while it’s syncing it. Both responses are totally understandable. I want PowerShell to stop if it can’t sync a file, and I want OneDrive to sync files when I expect it to. I could, and I have in some cases, written a bunch of PowerShell to check the lock status of a file, to deal with the locking issues that OneDrive creates, and so on. It’s tedious though, and honestly I’m not very good at it. That’s where you all come in…

What I really want, nay, need, is a way to pause OneDrive sync while I’m messing with files I know it will lock when syncing. I need two things, Stop-OneDriveSync and Start-OneDriveSync. That’s it. I asked Santa for them for Christmas, but all I got was socks.

So I took the next step, I whined on Twitter. Someone, suggested I create a UserVoice for it. I thought that was pretty solid advice, so I did.

Pause Syncing with PowerShell

What I’m asking from you, is if you too would like to be able to start and stop OneDrive syncing from PowerShell, please vote up the UserVoice. Here it is again in case you missed it. Smile

Pause Syncing with PowerShell

I’ll be keeping an eye on it, and I’ll know if you voted!

Thanks in advance.




There's a similar request already

Every once in a while I want to do this, so I search for it.  Today I found your blog post, and upvoted your uservoice suggestion.

When I looked at what else I'd voted for on uservoice, I found this I'd voted for in 2016, which was created in 2014:
 on 11/28/2019 6:55 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.


Body *

Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person


Want a message when I reply to your comment? Put your Twitter handle here.