INT_PKG_BUILDER/apps/FortigateVPN/install.ps1

20 lines
748 B
PowerShell
Raw Normal View History

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