MSP TOOLKIT

Free Tools Built by MSPs, for MSPs

Practical scripts, health checks, and automation tools designed by managed service providers who understand the daily grind. Download, deploy, and keep your clients' environments running smoothly.

🛠
MSP RESOURCES

Available Tools

Free, open-source scripts and utilities for MSPs. No signup required—just download and deploy.

HEALTH CHECK
☁

OneDrive Health Check

PowerShell script for ConnectWise Automate. Checks sync status, KFM, stale data, and client heartbeat across all users.

COMING SOON
🔍

More Tools

Additional MSP scripts and utilities are in development. Have an idea? Let us know!

POWERSHELL · CONNECTWISE AUTOMATE

OneDrive Health Check

A comprehensive PowerShell script that runs as SYSTEM via ConnectWise Automate. For every logged-on user, it validates OneDrive for Business sync health without touching user files or making network calls.

✅ What It Checks

  • ▶ OneDrive.exe is running in the user session
  • ▶ Business account is signed in
  • ▶ Known Folder Move (Desktop, Documents, Pictures)
  • ▶ Last data change timestamp inside OneDrive
  • ▶ Files saved outside OneDrive (wrong location)
  • ▶ Client log heartbeat (hung detection)

🔒 Security & Privacy

  • ▶ Zero network calls — fully offline
  • ▶ No credentials or secrets used
  • ▶ Never outputs file names or user data paths
  • ▶ Only reads file metadata, never opens files
  • ▶ Optional email masking with -MaskEmail
  • ▶ Auto-relaunches in 64-bit if needed

⚙ Output & Exit Codes

Status line: ODSTATUS=OK | WARN | FAIL | NOUSER

Exit codes: 0 = OK/NOUSER • 1 = WARN • 2 = FAIL

Issue codes: NOT_RUNNING, NOT_SIGNED_IN, KFM_OFF, STALE_<n>d, LOCAL_SAVES, HUNG_<n>d, NO_LOGS

Use -SingleLine for ConnectWise Automate Extra Data Fields (SQL-safe, max 250 chars).

💻 Usage Examples

# Basic health check
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\OneDriveHealthCheck.ps1

# Custom thresholds + event logging
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\OneDriveHealthCheck.ps1 -StaleDays 30 -RequireKFM -WriteEventLog

# Single-line output for Automate EDF
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\OneDriveHealthCheck.ps1 -SingleLine
⬇ Download OneDriveHealthCheck.ps1

PowerShell 5.1+ • Runs as SYSTEM • No dependencies • MIT-style free to use

SHA-256: 74eb1798172cf03f2a10bfd2e382e5d852163db3160941cb7ed8aa2f5aa7f649

REFERENCE

Script Parameters

Parameter Default Description
-StaleDays30Flag if no OneDrive changes in this many days
-LocalFileGraceDays7Flag local Desktop/Documents saves within this window
-HeartbeatDays3Flag if client hasn’t written a log in this many days
-MaxFilesToScan250,000Safety limit for folder scan
-MaxScanSeconds180Time limit for the scan
-RequireKFMswitchTreat missing KFM as FAIL instead of WARN
-MaskEmailswitchPartially mask account emails in output
-WriteEventLogswitchWrite result to Windows Application event log
-SingleLineswitchOutput one SQL-safe line for Automate EDFs
-MaxLength250Max chars for SingleLine output

Have a Tool Idea? Let’s Build It.

We’re always looking for automation opportunities. If you have a script or tool idea that would help the MSP community, reach out and let’s make it happen.

Get in Touch →
Build 10.20.26.v1