Created
June 8, 2016 04:11
-
-
Save ZJPat/3e8fd551a17b6086fc47357467f1f0eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
If (${env:ProgramFiles(x86)}) { | |
$uninstallpaths = Get-ChildItem -Path ${env:ProgramFiles(x86)}, $env:ProgramFiles -Recurse -Filter uninstall.exe | Where-Object {$_.fullname -like "*teamv*"} | Select-Object -expandproperty fullname | |
} | |
Else {$uninstallpaths = Get-ChildItem -Path $env:ProgramFiles -Recurse -Filter uninstall.exe | Where-Object {$_.fullname -like "*teamv*"} | Select-Object -expandproperty fullname} | |
If ($uninstallpaths) { | |
foreach ($uninstallpath in $uninstallpaths) { | |
Start-Process cmd -ArgumentList "/C `"$uninstallpath`" /S" -Wait | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment