Disclaimer: This information is posted as-is, and the content must be referenced at your own risk. Kindly contact Sophos Professional Services if you require assistance with your specific environment.
This Recommended Read is in the Beta stage scripting and includes the following.
The script has been tested and working. Implementation in Test Environment is highly recommended before proceeding to Production side,
IF NOT EXIST "c:\Program Files (x86)\Sophos\Sophos SSL VPN Client\uninstall.exe" goto :eof
REM Remove the old client
REM Kill running programs, preventing uninstall
taskkill /im openvpn* /F
REM Backup the OVPN config file
rem rmdir "c:\!vpn" /s /q
copy "c:\Program Files (x86)\Sophos\Sophos SSL VPN Client\config\*.ovpn" c:\!vpn\
REM Use uninstaller to remove the client
cd\Program Files (x86)\Sophos\Sophos SSL VPN Client
REM Do folder cleanup - if not, Sophos Connect refuse to install
rmdir "c:\Program Files (x86)\Sophos\Sophos SSL VPN Client" /s /q
IF "%PROCESSOR_ARCHITECTURE%" == "x86" GOTO X86_PROG
IF NOT EXIST "%ProgramFiles(x86)%\%Sophos_Connect%" GOTO INSTALL
exit /b 0
IF NOT EXIST "%ProgramFiles%\%Sophos_Connect%" GOTO INSTALL
exit /b 0
msiexec.exe /i "\\server\share\SophosConnect.msi" /QN
REM Deploying SSLVPN provisioning file - user must connect once with the client to fetch their profile when SF is in place.
REM Userportal on SF must be accessible and with a valid certificate!
copy /Y "\\server\share\xgsslvpn.pro" "C:\Program Files (x86)\Sophos\Connect\Import\"
REM Deploying old SSLVPN for UTM
copy /Y "c:\!vpn\*.ovpn" "C:\Program Files (x86)\Sophos\Connect\Import\"
REM Start Gui - tray icon.
start "" "C:\Program Files (x86)\Sophos\Connect\GUI\scgui.exe"
END && EXIT
Attached are the bat file and the provisioning file
Let me hear your thoughts :-)
Thank you for your contribution to the community.
Looks fabulous! Any more positive experiences?
Cheers - Bob
I tried just importing individual ovpn files in Sophos Connect and that has resulted in "VPN service is not running" messages.
I'll run your script and see if I have better luck when the files are imported that way.
We saw the same issues on some machines. I had an support ticket for this, but due to holiday session i wasn't able to discuss this with the support. Were you able to resolve the issues?
I just saw, that this is also discussed in another topic: Sophos Connect on Windows Server - Discussions - Sophos Firewall - Sophos Community
Great script, thanks for sharing. One question though. You probably ran this in the context of an account with administrative permissions. Afterwards, was the .ovpn connection available in the Sophos Connect client of the currently logged in user or the admin one?
First - thanks for the script, very useful!
Even since this is not really a Sophos Connect or SSL VPN issue, but some folks might have been running into the same problem:
If I'm running the script manually, everything is working as expected. If the script is being executed via GPO / Startup-Script, there is also no issue - up to the point that the OVPN config is not existing in the Connect Client after login.
Since I'm struggling since hours, I might be very happy about any useful hint.