2
1
I have to create an application with PowerShell that creates a new VPN connection (adapter) to a given host, with given settings (credentials, etc...).
The computers will be running Windows 7.
I found this cmdlet, but it's only for Windows 8.1 : Add-VpnConnection
Anybody has a PowerShell code to achieve equivalent goal in Windows 7 ?
Many thanks in advance !
Most network-focused cmdlets are Windows 8/8.1 exclusive. If it's possible at all, you'll probably need to reference some .NET Framework classes or WMI objects. – Iszi – 2014-08-25T12:58:46.400
Add-VpnConnection is part of PowerShell 4.0 -- if you'd like PS4 functionality, why not install PowerShell 4 on the Windows 7 machines?
– Ƭᴇcʜιᴇ007 – 2014-08-25T13:16:38.273@Ƭᴇcʜιᴇ007 thanks for your comment. I indeed considered to install the proper Management Framework, but it would be painfull to do so in my current situation. I'm really looking for a script allowing to achieve the goal in Windows 7, with PowerShell v3. Thanks in advance. – Ob1lan – 2014-08-25T13:24:12.357
@Ƭᴇcʜιᴇ007 As I've stated, most network-focused cmdlets,
Add-VpnConnection
included, are Windows 8/8.1/2012/2012R2 exclusive. Even with WMF 4.0/PowerShell 4.0 installed, the cmdlets are not available on lower versions of Windows. – Iszi – 2014-08-25T14:51:53.5271@Ob1lan For future reference, when you're limited to a specific PowerShell version, please specify the PowerShell version in the question body and/or tags. This way, you may avoid getting PS 4.0 answers/comments when you can only go up to 3.0. – Iszi – 2014-08-25T15:23:51.453