My line is adding VPN correctly:
Add-VpnConnection -Name "Interface Fluidics VPN" -AllUserConnection -ServerAddress "vpn.server.com" -TunnelType "L2TP" -EncryptionLevel "Optional" -AuthenticationMethod "MSCHAPv2" -L2tpPsk "VPNMePas$word" -Force -SplitTunneling -UseWinlogonCredential -RememberCredential
What I found is that connection won't establish unless I go in VPN properties -> Security -> Advance Settings and retype same VPNMePas$word in the box. And I have my connection.
Is that a $ symbol causing me the issue?
solved with `$
VPNMePas`$word
https://www.reddit.com/r/PowerShell/comments/3ow1d5/having_trouble_passing_the_dollar_sign_in_strings/