none
Modify DeleteVPNConnections.ps1 to delete a VPN connection with a specific server address automatically RRS feed

  • General discussion

  • Hi Guys,

    Firstly, thank you for the DeleteVPNConnections.ps1 it does help me out to an extent.

    I'm hoping you can guide me in modifying it to fit my scenario.

    I am assisting a client with around 200 users that make use of VPN, but they have configured it wrong on every client so I am trying to write a powershell script to remove the old connection based on the server address in the table and then add the following connection which I know works properly

    Add-VpnConnection -Name "NewVPNConnectionName" -ServerAddress "server.address.com" -TunnelType Automatic -EncryptionLevel Optional -AuthenticationMethod MSChapv2 -UseWinlogonCredential -SplitTunneling -AllUserConnection -RememberCredential -PassThru -DnsSuffix "company.local"

    I want to push it out via a GPO logon script, so would like there to be no user intervention what so ever. But I can't seem to find a way to delete a VPN connection with a specific server address and ensuring the user doesn't even know it has happened.

    Any and all help is greatly appreciated.

    Thanks

    Shaun

    • Changed type Bill_Stewart Monday, May 7, 2018 10:07 PM
    • Moved by Bill_Stewart Monday, May 7, 2018 10:07 PM This is not "teach me step by step how to use functions from a module" forum
    Wednesday, March 7, 2018 8:26 PM

All replies