Fixes
This commit is contained in:
parent
8da045562c
commit
28eb12c9d7
@ -1,4 +1,5 @@
|
||||
$PathIntune = "$Env:Programfiles\itego\intune"
|
||||
$installerName = "FortiClient_v7.4.0.1658.msi"
|
||||
|
||||
Start-Transcript -Path "$PathIntune\Log\FortigateVPN-install.log" -Force
|
||||
|
||||
@ -7,13 +8,13 @@ $installArgs = "/install","/quiet","/norestart"
|
||||
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
|
||||
Write-Host ("Fortigate VPN Installed versions installed: " + $installerName)
|
||||
|
||||
$process = Start-Process -Path reg.exe -ArgumentList @("Import", ("{0}\config\vpnProfiles.reg" -f $PSScriptRoot)) -Wait -passthru
|
||||
If($process.ExitCode)
|
||||
{
|
||||
Write-Host "Profiles Imported"
|
||||
foreach ($folder in (Get-ChildItem -Path ("{0}/config/" -f $PSScriptRoot) -Filter "vpn*.reg")) {
|
||||
$process = Start-Process -Path reg.exe -ArgumentList @("Import", $folder.FullName) -Wait -PassThru
|
||||
If($process.ExitCode)
|
||||
{
|
||||
Write-Host ("Profile [{0}] Imported" -f $folder.Name)
|
||||
}
|
||||
}
|
||||
0
|
||||
|
||||
Stop-Transcript
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user