How do I create a Windows VPN Connection and store its username and password with Powershell scripts?

John Schultz 1 Reputation point

OK,... In regards to the question, creating-a-vpn-connection-with-credentials-username-password

How can I create a VPN entry using PowerShell ONLY (this would also require storing the Username and Password combination Pairs) The OP refers to an addon "he has created".

Where can I find this code? or

Where can I find the addon? or

Where can I find detailed information about creating this add-on myself?

Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,312 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,451 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 33,951 Reputation points Microsoft Vendor


    To create a VPN connection you can use the Add-VpnConnection cmdlet. The following link is helpful

    Best Regards,
    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.