#madeBy krolaki.eu
#-------------[deklarations]--------------------------
#params
$winscpActualVersion='6.1.2'
$winscp
#-------------[functions]--------------------------
function getWinScp {
return $winscp = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -match 'WinSCP' }
}
$winscp = getWinScp
if($winscp.Version -eq $winscpActualVersion) {
break
} else {
$winscp.Uninstall()
}