FortiClient VPN Config profile fails to import via Intune
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?