Fixes to FG Install

This commit is contained in:
jonatanrek committed 2025-02-14 09:28:03 +01:00
1 parent f173df46e4
commit f80333d14b
5 files changed
+16 -5

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
# array of uninstall args
$uninstallArgs = "/uninstall"," ","/quiet", "/norestart"
$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "FortiClient VPN*" }
foreach ($version in $dotnetVersions) {
# update array index 1 with version id
$uninstallArgs[1] = '"' + $version.IdentifyingNumber + '"'
Write-Host "Uninstalling $($version.Name) ($($version.Version))... $("$uninstallArgs")"
Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait
}