INT_PKG_BUILDER/apps/FortigateVPN/install.ps1
2025-02-14 09:28:03 +01:00

20 lines
748 B
PowerShell

$PathIntune = "$Env:Programfiles\itego\intune"
$installerName = "FortiClient_v7.4.0.1658.msi"
Start-Transcript -Path "$PathIntune\Log\FortigateVPN-install.log" -Force
$installerPath = ('./bin/' + $installerName)
$installArgs = "/quiet","/norestart"
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
Write-Host ("Fortigate VPN Installed versions installed: " + $installerName)
foreach ($folder in (Get-ChildItem -Path ("{0}/config/" -f $PSScriptRoot) -Filter "vpn*.reg")) {
$process = Start-Process -FilePath reg.exe -ArgumentList @("Import", $folder.FullName) -Wait -PassThru
If($process.ExitCode)
{
Write-Host ("Profile [{0}] Imported" -f $folder.Name)
}
}
0
Stop-Transcript