Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
daradona10
New Contributor

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? 

4 REPLIES 4
Anthony_E
Community Manager
Community Manager

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,

Anthony-Fortinet Community Team.
daradona10
New Contributor

Thank You

funkylicious
SuperUser
SuperUser

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.

 

L.E. https://community.fortinet.com/t5/Support-Forum/Forticlient-free-enterprise-distribution-SCCM/m-p/92...

"jack of all trades, master of none"
"jack of all trades, master of none"
daradona10
New Contributor

No that doesn't work. Very frustrating

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors