Hello Everyone
I have set up FortiClient VPN via Intune to deploy to company portal for our users in the company to grab but I want to have the pre existing config to be set up but no matter what way I set it up via script as no errors are showing, I am stumped. I have tried everything. Any help would be greatly appreciated as to where I might be going wrong or need to adjust?
My config in xml. I have left blank in the spaces
FortiClientConfiguration>
<VPN>
<Connection>
<Name></Name>
<Server></Server>
<Port></Port>
<Username></Username>
<Password></Password>
<sso_enabled>1</sso_enabled>
</Connection>
</VPN>
</FortiClientConfiguration>
This is my install powershell script which works installing it but doesnt pull the config above with it
# Install FortiClient
$installExitCode = (Start-Process "msiexec.exe" -ArgumentList "/i FortiClient.msi /passive /quiet INSTALLLEVEL=3 DESKTOPSHORTCUT=0 /NORESTART" -NoNewWindow -Wait -PassThru).ExitCode
if ($installExitCode -ne 0) {
Write-Error "Installation failed with exit code $installExitCode"
exit $installExitCode
}
# Pause for 15 seconds
Start-Sleep 15
# Verify configuration file exists
$configFilePath = "C:\HMVVPN.conf"
if (-Not (Test-Path $configFilePath)) {
Write-Error "Configuration file not found: $configFilePath"
exit 1
}
# Import VPN configuration
$importProcess = Start-Process "C:\Program Files\Fortinet\FortiClient\FCConfig.exe" -ArgumentList "-m all -f $configFilePath -o import -i 1 -p YourPassword" -Wait -PassThru
$importExitCode = $importProcess.ExitCode
if ($importExitCode -ne 0) {
Write-Error "Configuration import failed with exit code $importExitCode"
exit $importExitCode
} else {
Write-Output "Configuration import successful."
}
ANY IDEA AS TO WHY IT ISNT PULLING THE CONFIG IN?
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hello,
Thank you for using the Community Forum. I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.
Thanks,
Thank You
Hi,
Maybe try, FCConfig -m vpn -f <filename> -o importvpn -i 1 -p <encrypted password> or FCConfig -m vpn -f <filename> -o importvpn -i 1, if not password protected.
No that doesn't work. Very frustrating
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1696 | |
1091 | |
752 | |
446 | |
228 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.