Closed florianendrich closed 3 years ago
Hi,
Thank you for submitting the bug, I will look into it and let you know once I find the solution.
Shells are based on Invoke-Expression
command and not on process pipes so that might be the reason why it hangs - i.e. there are no direct pipes from socket to PowerShell process.
Best regards, Ivan.
Hi,
This is my test scenario:
Add-VpnConnection -Name "Test" -ServerAddress "10.1.1.1" -TunnelType "Pptp" -EncryptionLevel "Required" -AuthenticationMethod MSChapv2 -UseWinlogonCredential -SplitTunneling -AllUserConnection -RememberCredential -PassThru
Get-VpnConnection -AllUserConnection
Remove-VpnConnection -Name "Test" -AllUserConnection -Force -PassThru
Use -Force
switch with Remove-VpnConnection
. Have more info here.
Also, please have a look at this and this -Confirm
switch.
Best regards, Ivan.
Hei,
yes this Workarround works, would be nice to not hang the connection though. Maybe working with a timeout would be an option.
I can live with that, but taking care of this behavior would make your script more convient to use.
Best regards and thanks for the effort.
Hi,
Thank you for your feedback. Maybe in the future I will make one with process pipes so no output will hang.
I will close this issue now.
Best regards, Ivan.
Hei, thanks for your work.
I noticed a bug, you can reproduce it by getting powershell to ask for confirmation
Remove-VpnConnection -Name '<ConnectionName>'
The PowherShell now ask for a Confirmation
Deleting VPN connection <ConnectionName>. Do you want to continue?
which is not showing up on remote host, instead it just hangs.