$AOVPNName = "AlwaysOn" $aovpn = Get-VpnConnection -AllUserConnection -Name $AOVPNName Write-Host "Verbindungssatus der Verbindung $($AOVPNName): $($aovpn.ConnectionStatus)" -ForegroundColor Cyan Write-Host "Trenne Verbindung: $($AOVPNName)" -ForegroundColor Yellow Start-Process -FilePath "$($env:windir)\system32\rasdial.exe" -ArgumentList "$($AOVPNName) /disconnect" -NoNewWindow Write-Host "Warte 5 Sekunden" -ForegroundColor DarkYellow Start-Sleep -Seconds 5 Write-Host "5 Sekunden vorbei, starte die Verbindung erneut." -ForegroundColor DarkYellow Start-Process -FilePath "$($env:windir)\system32\rasdial.exe" -ArgumentList "$($AOVPNName)" -NoNewWindow