Skip to content

Instantly share code, notes, and snippets.

@jonimattila
Created February 26, 2019 10:44
Show Gist options
  • Save jonimattila/0d67efb40df24951910429a06e3add2e to your computer and use it in GitHub Desktop.
Save jonimattila/0d67efb40df24951910429a06e3add2e to your computer and use it in GitHub Desktop.
$User = gwmi win32_computersystem -Property Username
$UserName = $User.UserName
$UserSplit = $User.UserName.Split("\")
$OneDrive = "$env:SystemDrive\users\" + $UserSplit[1] +"\appdata\local\microsoft\onedrive\onedrive.exe"
# Parameter to Log
if ((test-path "$OneDrive") -and ((Get-Item $OneDrive).VersionInfo.FileVersion -gt '19'))
{
Write-Host "Installed"
}
Else
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment