Hi Support,
Here are the tasks/deployments I used for transitioning users from Sophos SSL VPN Client to Sophos Connect client. I need them either combined or at least modified to include the required checks for ImmyBot to report accurate success/failure of each (They would always report as failed in their current state, despite executing successfully):
(When I tried to combine these tasks/scripts, it would fail to execute correctly. Not sure if a wait function between each is all that is needed)
Kill Sophos SSL VPN Client (Task - Powershell):
taskkill /IM openvpn.exe /F
taskkill /IM openvpnserv.exe /F
taskkill /IM openvpn-gui.exe /F
Uninstall Sophos SSL VPN Client (Task - Poweshell):
Start-Process -FilePath "C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\Uninstall.exe" -ArgumentList "/S /qn"
Remove-Item -LiteralPath "C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\config" -Force -Recurse
Remove-Item -LiteralPath "C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\log" -Force -Recurse
Remove-Item -LiteralPath "C:\Program Files (x86)\Sophos\Sophos SSL VPN Client" -Force -Recurse
Sophos Connect – No Provisioning (Deployment) (no change needed*)
Sophos Connect provisioning file – File in Specific Location (Task – Powershell):
Parameters:
File: VPN Setup.pro
Location: AllUsersDesktop
Script:
$Destination = Invoke-ImmyCommand {
switch($Using:Location) {
"AllUsersDesktop" {
$Destination = "$($env:Public)\Desktop"
}
"WindowsFolder" {
$Destination = "$($env:SystemRoot)"
}
"OtherLocation" {
$Destination = "$($Using:OtherLocation)"
}
}
return $Destination
}
$File | FileShould-Be -InPath $Destination
I need the above tasks to have the tests that tell ImmyBot if they succeeded/failed, as well as being combined, if possible.
I also have a separate task which I need to run after the migrations are complete, which removes provisioning file after the user does not need it anymore:
(It works, but I also need the appropriate tests added to this script which notify ImmyBot if it succeeded/failed so we get confirmation if it succeeded/failed)
Remove VPN Setup file (Task – Powershell):
foreach($userfolder in (get-childitem "c:\users" -Name)){
$currentuserpath = "C:\Users\"+$userfolder+"\Desktop\VPN Setup.pro"
if (!(Test-Path $currentuserpath)) {
Write-Host "$currentuserpath does not exist. Skipped"
continue
}
else {
$RemovedSuccessfully = Remove-Item $currentuserpath -Force -ErrorAction SilentlyContinue
Write-Host "$currentuserpath deleted."
}
}
return $true
Let me know if you have any questions or need additional information.