ANAVEM
Languagefr
How to Deploy FortiClient VPN with Configuration Using Microsoft Intune

How to Deploy FortiClient VPN with Configuration Using Microsoft Intune

Deploy FortiClient VPN across enterprise devices using Microsoft Intune with pre-configured settings through MSI extraction, PowerShell scripts, and automated distribution without requiring Fortinet EMS Premium.

March 21, 2026 18 min
hardintune 8 steps 18 min

Why Deploy FortiClient VPN Through Microsoft Intune?

Managing VPN client deployment across enterprise environments traditionally requires significant manual effort and often leads to inconsistent configurations. Microsoft Intune provides a centralized platform for deploying and configuring FortiClient VPN without requiring expensive Fortinet EMS Premium licenses or complex infrastructure.

This approach leverages Intune's native application deployment capabilities combined with PowerShell scripting to achieve automated FortiClient installation and configuration. The method extracts the MSI installer from Fortinet's online installer, packages it as a Line-of-Business application, and uses registry-based configuration scripts to pre-configure VPN settings.

What Are the Key Benefits of This Deployment Method?

The primary advantage is eliminating the need for Fortinet's Enterprise Management Server (EMS) Premium features while maintaining centralized control over VPN client deployment. Organizations can deploy FortiClient with pre-configured settings to hundreds or thousands of devices without manual intervention or user configuration requirements.

This method also provides better integration with existing Microsoft 365 environments, leverages existing Intune infrastructure, and reduces licensing costs compared to Fortinet's enterprise management solutions. The PowerShell-based configuration approach offers flexibility to customize VPN settings for different user groups or departments while maintaining consistent security policies.

What Technical Challenges Does This Tutorial Address?

The main technical challenge is that Fortinet doesn't provide direct MSI downloads for FortiClient, requiring extraction from the online installer. Additionally, FortiClient doesn't support native Intune VPN profiles, necessitating a combination of application deployment and registry-based configuration through PowerShell scripts.

This tutorial addresses these challenges by providing step-by-step procedures for MSI extraction, proper Intune application packaging, PowerShell script creation for VPN configuration, and comprehensive testing and troubleshooting procedures. The approach ensures reliable deployment across diverse Windows environments while maintaining security and compliance requirements.

Implementation Guide

Full Procedure

01

Extract FortiClient VPN MSI from Online Installer

Fortinet doesn't provide direct MSI downloads, so you need to extract the MSI from the online installer. This process captures the actual installation package that Intune can deploy.

Download the FortiClient VPN online installer from the Fortinet support portal. You'll need a valid support account to access the downloads section.

Run the installer but don't complete the installation:

FortiClientVPNOnlineInstaller.exe

When the installer reaches the welcome screen, it downloads the MSI to a temporary cache location. Navigate to the cache directory:

C:\ProgramData\Applications\Cache\

Look for a folder with a GUID name containing a version number subfolder. Sort by date modified to find the most recent extraction. The MSI file will be named something like FortiClientVPN.msi.

Copy the MSI file to a safe location on your system:

copy "C:\ProgramData\Applications\Cache\{GUID}\{VERSION}\FortiClientVPN.msi" "C:\Temp\FortiClientVPN.msi"

Cancel the installer after copying the MSI file.

Pro tip: Always verify the MSI file size is reasonable (typically 50-100MB) and check the file properties to confirm it's a valid Windows Installer package.

Verification: Right-click the extracted MSI and select Properties. Confirm the file type shows as "Windows Installer Package" and the version matches your expected FortiClient version.

02

Create Line-of-Business App in Microsoft Intune

Now you'll package the extracted MSI as a Line-of-Business (LOB) application in Intune for distribution to managed devices.

Log into the Microsoft Intune admin center at https://intune.microsoft.com and navigate to Apps:

Go to Apps > All apps > Add > Line-of-business app

Select Windows as the platform and upload your extracted FortiClient MSI file. Configure the app information:

  • Name: FortiClient VPN
  • Description: FortiClient VPN client for secure remote access
  • Publisher: Fortinet
  • Command-line arguments: /quiet /norestart
  • Install behavior: System

Set the detection rules to use the MSI product code (automatically detected) or create a custom rule:

# Custom detection rule example
$AppPath = "C:\Program Files\Fortinet\FortiClient\FortiClient.exe"
if (Test-Path $AppPath) {
    $Version = (Get-ItemProperty $AppPath).VersionInfo.FileVersion
    Write-Output "FortiClient version: $Version"
}

Configure requirements:

  • Operating system architecture: x64
  • Minimum operating system: Windows 10 1607
Warning: Don't set overly restrictive requirements that might exclude devices in your environment. Test with a small group first.

Assign the app to your target device groups. Start with a pilot group before rolling out enterprise-wide.

Verification: Check the app status in Intune shows "Ready to install" and verify the assignment shows your target groups correctly.

03

Configure VPN Settings Manually for Script Template

Before creating the automated configuration script, you need to understand the registry structure by manually configuring FortiClient on a test device.

Install FortiClient on a test machine and configure your VPN connection manually through the FortiClient interface. This creates the registry entries you'll need to replicate via script.

After configuring the VPN connection, export the registry settings:

reg export "HKLM\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels" C:\Temp\FortiVPN_Config.reg

Open the exported registry file to examine the structure:

[HKEY_LOCAL_MACHINE\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\YourVPNName]
"server"="vpn.yourcompany.com"
"port"="443"
"description"="Company VPN Connection"
"auth_method"="sslvpn"
"save_password"=dword:00000000
"auto_connect"=dword:00000000

Document all the registry values you need to replicate. Common settings include:

  • server - VPN server FQDN or IP
  • port - Connection port (usually 443)
  • description - User-friendly name
  • auth_method - Authentication method
  • certificate - Client certificate path if used

Test the manual configuration thoroughly to ensure it works before proceeding to script creation.

Verification: Connect to the VPN manually and confirm successful authentication and network access to internal resources.

04

Create PowerShell Configuration Script

Create a PowerShell script that will automatically configure the VPN settings in the registry after FortiClient installation.

Create a new PowerShell script file named Configure-FortiVPN.ps1:

# FortiClient VPN Configuration Script
# Configure VPN connection via registry

# Variables - Customize these for your environment
$VPNName = "CompanyVPN"
$VPNServer = "vpn.yourcompany.com"
$VPNPort = "443"
$Description = "Company VPN Connection"
$AuthMethod = "sslvpn"

# Registry path for FortiClient VPN tunnels
$RegPath = "HKLM:\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\$VPNName"

try {
    # Check if FortiClient is installed
    $FortiClientPath = "C:\Program Files\Fortinet\FortiClient\FortiClient.exe"
    if (-not (Test-Path $FortiClientPath)) {
        Write-Error "FortiClient not found. Ensure application is installed first."
        exit 1
    }

    # Create registry path if it doesn't exist
    if (-not (Test-Path $RegPath)) {
        Write-Output "Creating registry path: $RegPath"
        New-Item -Path $RegPath -Force | Out-Null
    }

    # Set VPN configuration values
    Write-Output "Configuring VPN settings..."
    New-ItemProperty -Path $RegPath -Name "server" -Value $VPNServer -PropertyType String -Force
    New-ItemProperty -Path $RegPath -Name "port" -Value $VPNPort -PropertyType String -Force
    New-ItemProperty -Path $RegPath -Name "description" -Value $Description -PropertyType String -Force
    New-ItemProperty -Path $RegPath -Name "auth_method" -Value $AuthMethod -PropertyType String -Force
    New-ItemProperty -Path $RegPath -Name "save_password" -Value 0 -PropertyType DWord -Force
    New-ItemProperty -Path $RegPath -Name "auto_connect" -Value 0 -PropertyType DWord -Force

    Write-Output "VPN configuration completed successfully"
    
    # Verify configuration
    $ServerValue = Get-ItemProperty -Path $RegPath -Name "server" -ErrorAction SilentlyContinue
    if ($ServerValue.server -eq $VPNServer) {
        Write-Output "Configuration verified: Server = $($ServerValue.server)"
        exit 0
    } else {
        Write-Error "Configuration verification failed"
        exit 1
    }
}
catch {
    Write-Error "Script execution failed: $($_.Exception.Message)"
    exit 1
}

If your organization requires signed scripts, sign the PowerShell script:

# Self-sign the script (for testing)
$cert = New-SelfSignedCertificate -CertStoreLocation Cert:\CurrentUser\My -Subject "CN=PowerShell Code Signing" -KeyUsage DigitalSignature -Type CodeSigningCert
Set-AuthenticodeSignature -FilePath "Configure-FortiVPN.ps1" -Certificate $cert
Pro tip: Test the script locally first with PowerShell -ExecutionPolicy Bypass -File Configure-FortiVPN.ps1 to ensure it works before deploying through Intune.

Verification: Run the script manually and check that the registry entries are created correctly under HKLM\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels.

05

Deploy PowerShell Script via Intune

Deploy your configuration script through Intune's PowerShell script management feature to automatically configure VPN settings after FortiClient installation.

In the Intune admin center, navigate to device scripts:

Go to Devices > Scripts and remediations > Platform scripts > Add > Windows 10 and later

Upload your PowerShell script and configure the settings:

  • Name: Configure FortiClient VPN
  • Description: Automatically configures company VPN settings in FortiClient
  • Script location: Upload your Configure-FortiVPN.ps1 file

Configure execution settings:

  • Run this script using the logged on credentials: No
  • Enforce script signature check: Yes (if you signed the script)
  • Run script in 64 bit PowerShell Host: Yes
Warning: Running as system context is required for registry modifications under HKLM. User context won't have sufficient permissions.

Set up assignments and scheduling:

  • Assign to the same device groups as your FortiClient app
  • Consider using a dependency or delay to ensure FortiClient installs before the script runs

Create a detection script to verify successful configuration:

# Detection script
$RegPath = "HKLM:\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\CompanyVPN"
if (Test-Path $RegPath) {
    $server = Get-ItemProperty -Path $RegPath -Name "server" -ErrorAction SilentlyContinue
    if ($server.server -eq "vpn.yourcompany.com") {
        Write-Output "VPN configured correctly"
        exit 0
    }
}
Write-Output "VPN not configured"
exit 1

Verification: Monitor script execution in Intune under Device status. Check that devices show "Success" status and verify the VPN connection appears in FortiClient on target devices.

06

Configure App Dependencies and Deployment Order

Ensure proper deployment sequencing so FortiClient installs before the configuration script runs. This prevents script failures due to missing application files.

Set up app dependencies in Intune to control installation order:

Edit your FortiClient VPN app in Intune and go to Properties > Dependencies > Add

Configure dependency relationships if you have prerequisite software (like specific certificates or network drivers).

For the PowerShell script, create a remediation script that checks for FortiClient before applying configuration:

# Enhanced configuration script with dependency checking
$MaxRetries = 5
$RetryDelay = 30

for ($i = 1; $i -le $MaxRetries; $i++) {
    $FortiClientPath = "C:\Program Files\Fortinet\FortiClient\FortiClient.exe"
    
    if (Test-Path $FortiClientPath) {
        Write-Output "FortiClient found, proceeding with configuration..."
        # Run your configuration code here
        break
    } else {
        Write-Output "Attempt $i: FortiClient not found, waiting $RetryDelay seconds..."
        if ($i -eq $MaxRetries) {
            Write-Error "FortiClient installation not detected after $MaxRetries attempts"
            exit 1
        }
        Start-Sleep -Seconds $RetryDelay
    }
}

Configure assignment filters to target specific device groups or exclude devices that shouldn't receive the VPN configuration:

{
  "filterType": "include",
  "rule": "(device.deviceOwnership -eq \"Corporate\") and (device.operatingSystem -eq \"Windows\")"
}

Set up monitoring and reporting:

  • Create a custom device compliance policy that checks for VPN configuration
  • Use Intune reporting to track deployment success rates
  • Set up alerts for failed deployments
Pro tip: Use Intune's "Required" assignment for critical business applications and "Available" for optional tools. This ensures VPN gets deployed automatically while giving users control over optional software.

Verification: Check the deployment timeline in Intune device details to confirm FortiClient installs before the configuration script runs. Test on a pilot device to verify the complete workflow.

07

Test and Validate Deployment

Thoroughly test your deployment on pilot devices before rolling out to the entire organization. This step identifies potential issues and validates the complete workflow.

Select a small group of test devices representing your environment diversity (different Windows versions, hardware configurations, network locations).

Monitor the deployment process in real-time:

# PowerShell script to check deployment status locally
$AppName = "FortiClient VPN"
$VPNName = "CompanyVPN"

# Check if app is installed
$App = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "*FortiClient*" }
if ($App) {
    Write-Output "✓ FortiClient installed: $($App.Version)"
} else {
    Write-Output "✗ FortiClient not found"
}

# Check VPN configuration
$RegPath = "HKLM:\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\$VPNName"
if (Test-Path $RegPath) {
    $Config = Get-ItemProperty -Path $RegPath
    Write-Output "✓ VPN configured: Server = $($Config.server)"
} else {
    Write-Output "✗ VPN configuration not found"
}

# Test VPN connectivity (basic)
$VPNServer = (Get-ItemProperty -Path $RegPath -Name "server" -ErrorAction SilentlyContinue).server
if ($VPNServer) {
    $TestConnection = Test-NetConnection -ComputerName $VPNServer -Port 443
    if ($TestConnection.TcpTestSucceeded) {
        Write-Output "✓ VPN server reachable"
    } else {
        Write-Output "✗ Cannot reach VPN server"
    }
}

Validate end-user experience:

  1. Launch FortiClient on test devices
  2. Verify the VPN connection appears in the connection list
  3. Test authentication with user credentials
  4. Confirm network access to internal resources after connection
  5. Test disconnect and reconnect functionality

Check common failure points:

  • Windows Defender or third-party antivirus blocking installation
  • Group Policy conflicts with VPN settings
  • Network restrictions preventing VPN traffic
  • Certificate issues for SSL VPN authentication

Document any issues and create troubleshooting procedures:

# Troubleshooting script for common issues
# Check Windows Event Logs for FortiClient errors
Get-WinEvent -FilterHashtable @{LogName='Application'; ProviderName='FortiClient'} -MaxEvents 10 | Format-Table TimeCreated, LevelDisplayName, Message -Wrap

# Check Intune management extension logs
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin'} -MaxEvents 20
Warning: Some enterprise environments have BitLocker or compliance policies that can interfere with VPN connections. Test thoroughly in your specific environment before full deployment.

Verification: Complete successful VPN connections from multiple test devices, confirm internal resource access, and validate that users can connect without IT assistance.

08

Monitor and Troubleshoot Deployment Issues

Implement comprehensive monitoring and establish troubleshooting procedures for ongoing deployment management and user support.

Set up Intune reporting dashboards to track deployment metrics:

Navigate to Apps > Monitor > App install status to view FortiClient deployment statistics.

Create custom reports for VPN configuration success:

# PowerShell script for deployment reporting
$Computers = Get-ADComputer -Filter * -Properties OperatingSystem | Where-Object { $_.OperatingSystem -like "*Windows 10*" -or $_.OperatingSystem -like "*Windows 11*" }

$Results = foreach ($Computer in $Computers) {
    try {
        $Session = New-PSSession -ComputerName $Computer.Name -ErrorAction Stop
        $Status = Invoke-Command -Session $Session -ScriptBlock {
            $FortiClient = Test-Path "C:\Program Files\Fortinet\FortiClient\FortiClient.exe"
            $VPNConfig = Test-Path "HKLM:\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\CompanyVPN"
            [PSCustomObject]@{
                ComputerName = $env:COMPUTERNAME
                FortiClientInstalled = $FortiClient
                VPNConfigured = $VPNConfig
                LastChecked = Get-Date
            }
        }
        Remove-PSSession $Session
        $Status
    } catch {
        [PSCustomObject]@{
            ComputerName = $Computer.Name
            FortiClientInstalled = "Error"
            VPNConfigured = "Error"
            LastChecked = Get-Date
            Error = $_.Exception.Message
        }
    }
}

$Results | Export-Csv -Path "C:\Reports\FortiClient-Deployment-Status.csv" -NoTypeInformation

Common troubleshooting scenarios and solutions:

IssueSymptomsSolution
MSI Installation FailsApp shows "Failed" in IntuneCheck device logs, verify MSI integrity, ensure no conflicting software
Script Execution BlockedVPN not configured after app installVerify execution policy, check script signing, run as system context
VPN Connection FailsAuthentication errors, timeoutsVerify server settings, check certificates, test network connectivity
Registry Access DeniedScript runs but settings not appliedEnsure script runs as system, check UAC settings, verify permissions

Set up automated remediation for common issues:

# Remediation script for missing VPN configuration
$RegPath = "HKLM:\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\CompanyVPN"

if (-not (Test-Path $RegPath)) {
    Write-Output "VPN configuration missing, attempting repair..."
    
    # Re-run configuration script
    try {
        # Your configuration code here
        Write-Output "Configuration repaired successfully"
    } catch {
        Write-Error "Remediation failed: $($_.Exception.Message)"
        # Log to event log for monitoring
        Write-EventLog -LogName Application -Source "FortiClient Deployment" -EventId 1001 -EntryType Error -Message "VPN configuration remediation failed: $($_.Exception.Message)"
    }
}

Establish user support procedures:

  • Create self-service troubleshooting guides
  • Document common user error messages and solutions
  • Set up helpdesk escalation procedures for complex issues
  • Provide alternative connection methods for critical users

Verification: Confirm monitoring dashboards show accurate deployment status, test remediation scripts resolve common issues, and validate that support procedures enable quick issue resolution.

Frequently Asked Questions

Can I deploy FortiClient VPN through Intune without Fortinet EMS Premium licensing?+
Yes, you can deploy FortiClient VPN through Microsoft Intune without requiring Fortinet EMS Premium licenses. This method uses MSI extraction from the online installer, deploys it as a Line-of-Business app in Intune, and configures VPN settings through PowerShell scripts that modify registry entries. While you lose some advanced EMS features like centralized policy management and detailed reporting, you maintain full control over client deployment and basic configuration management through Intune's native capabilities.
How do I extract the FortiClient MSI file since Fortinet doesn't provide direct downloads?+
To extract the FortiClient MSI, download the online installer from Fortinet's support portal and run it until the welcome screen appears. The installer downloads the MSI to C:\ProgramData\Applications\Cache\{GUID}\{VERSION}\. Navigate to this location, sort by date modified to find the most recent extraction, and copy the MSI file to a safe location before canceling the installer. The extracted MSI is typically 50-100MB and can be verified by checking its properties to confirm it's a valid Windows Installer package.
What registry settings are required to configure FortiClient VPN connections automatically?+
FortiClient VPN configurations are stored under HKLM:\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\{VPNName}. Key registry values include 'server' (VPN server FQDN), 'port' (connection port, usually 443), 'description' (user-friendly name), 'auth_method' (authentication type), and optional settings like 'save_password' and 'auto_connect'. To determine the exact values needed, manually configure FortiClient on a test device and export the registry branch using 'reg export' command. This provides the template for your PowerShell configuration script.
Why do PowerShell scripts fail to configure FortiClient settings in Intune deployments?+
Common PowerShell script failures occur when FortiClient isn't installed before the script runs, insufficient permissions to modify HKLM registry entries, or execution policy restrictions blocking unsigned scripts. Ensure scripts run in system context (not user context) for registry access, implement retry logic to wait for FortiClient installation, and consider script signing if your organization enforces signature verification. Additionally, verify that no Group Policy settings conflict with the registry modifications and that Windows Defender or antivirus software isn't blocking script execution.
How can I troubleshoot FortiClient VPN connection issues after Intune deployment?+
Troubleshoot FortiClient VPN issues by first verifying the application installed correctly and registry settings were applied properly. Check Windows Event Logs for FortiClient-specific errors, test network connectivity to the VPN server on required ports (UDP 500/4500, TCP 443), and verify certificate configurations if using SSL VPN. Common issues include BitLocker or compliance policies interfering with VPN connections, firewall restrictions blocking VPN traffic, and authentication problems due to incorrect server settings. Use PowerShell scripts to automate status checking across multiple devices and implement remediation scripts for common configuration problems.

Discussion

Share your thoughts and insights

Sign in to join the discussion