Microsoft is building odcli, a command-line interface (CLI) for the OneDrive sync app on Windows and macOS. The utility reports sync status, signed-in accounts, folder backup configuration, and applied OneDrive policies, and it can stop or start the sync client. Because it can emit JSON, you can fold it into PowerShell scripts, Intune Remediations, and AI agents. This article walks through how odcli works based on Microsoft's demo, what you can accomplish with it, and which constraints apply during the private preview. General availability is slated for March 2027.
Source