Update remove-aovpn.ps1

This commit is contained in:
smo
2025-03-25 17:25:39 +00:00
parent 3f492cddee
commit 4d9467716d

View File

@@ -12,8 +12,15 @@ Start-Sleep -Seconds 5
# Try to remove the VPN connection # Try to remove the VPN connection
try { try {
Remove-VpnConnection -AllUserConnection -Name "Staedion AoVPN-D" -Force Remove-VpnConnection -AllUserConnection -Name "Staedion AoVPN-D" -Force -ErrorAction Stop
Remove-VpnConnection -Name "Staedion AoVPN-U" -Force Write-Output "VPN connection successfully removed."
}
catch {
Write-Error "Error removing the VPN connection: $_"
}
try {
Remove-VpnConnection -Name "Staedion AoVPN-U" -Force -ErrorAction Stop
Write-Output "VPN connection successfully removed." Write-Output "VPN connection successfully removed."
} }
catch { catch {