Forum Discussion
Why isn't there a PowerShell module for OneDrive?
There isn’t an official PowerShell module for OneDrive because Microsoft exposes management primarily through Graph API and SharePoint Online cmdlets, rather than a dedicated OneDrive interface. OneDrive is treated as a personal/document library on SharePoint, so most admin-level automation routes through those APIs instead. For client-side sync state, Microsoft hasn’t published a supported API; the sync client is designed as an end-user tool, not an admin-automatable service. That’s why checks like “is sync still running” require workarounds (e.g., querying sync client logs, registry keys, or using Graph for file status) rather than a simple cmdlet.
Considering how many "I hate OneDrive" posts there are, they're nearly always directed at OneDrive.exe hence my open question why there aren't better client side tools available. I suspect OneDrive uses SQLite under the hood, looking at what files are been accessed when OneDrive has been sat processing changes for a few hours. As you say, all the solutions are sketchy and required some very hairy/unstable coding.