Created
February 26, 2019 10:44
-
-
Save jonimattila/0d67efb40df24951910429a06e3add2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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