PowerShell – Verify OneDrive is Installed

email me

This is a simple one liner to detect whether or not OneDrive is installed.

You would add your code where the Write-Host is at.

if( Test-Path "$env:LOCALAPPDATA\Microsoft\Onedrive\OneDrive.exe" ) {Write-Host "installed"}
exit 0