rasdial changing username and password fails establishing network connection of vpn?

Anonymous
2024-03-04T09:43:07+00:00

I was using this command to create a new vpn

Add-VpnConnection -Name "Connection_Name" -ServerAddress "Server_Address or IP" -TunnelType "Ikev2" -EncryptionLevel "Optional" -AuthenticationMethod Eap -SplitTunneling -RememberCredential -PassThru

--The connection created successfully.

Then to modify the vpn connection

Set-VpnConnection -Name "Connection_Name" -ServerAddress "Server_Address or IP"

--The server address changes successfully

Then for setting the username and password

Set-VpnConnectionUsernamePassword -connectionname "Connection_Name" -username "Your_Username" -password "Your_Password"

It changed if check it in the UI Interface of vpn connection in windows.

But when I try to connect with command--

rasdial "Connection_Name" "Username" "Password"

--It fails to connect the username and password doesn't changes. I find that out from the server. But if I try to connect from the UI interface. The username and password takes new ones and sets it. Then if we run the command to connect again it's successfully gets connected.

So, my question is does the username and password gets store into some sort of cache. If so how can I change it to new one? If there is other module which changes username and the password better?

Windows for business | Windows Client for IT Pros | Networking | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more