Microsoft OneDrive Sync Status DV
Summary
This document outlines a script designed to collect OneDrive sync status information from Windows machines exclusively for Non-SharePoint Linked Sites. The script leverages the Onedrive.dll module to retrieve the requisite data. It is crucial to note that the script necessitates an active user session on the computer to operate effectively.
Sample Run

Dependencies
Global Parameters
Name | Default | Required | Description |
---|
ODFolder | C:/Windows/LTSvc/Packages/ODFolder | True | Path to write and execute the PowerShell script. |
ODFile | C:/Windows/LTSvc/Packages/ODFolder/ODFile.ps1 | True | Full path of the PowerShell script. |
Script States
Name | Example | Description |
---|
OneDriveSyncStatus | "Sync Status for "ramkishor" for "C:/Users/ramkishor/OneDrive/Desktop" is "Synced"; "Sync Status for "ramkishor" for "C:/Users/ramkishor/OneDrive/Documents" is "Synced"; "Sync Status for "ramkishor" for "C:/Users/ramkishor/OneDrive/Pictures" is "Not Synced";" | Stores the result returned by the PowerShell script checking the OneDrive status on the endpoint. |
OneDriveSyncStatusScriptruntime | 2023-10-26 11:51:02 | Stores the data collection time |
Output