Powershell script windows xp , 7 , 10

Aaron EOM 0 Reputation points
2020-08-12T02:00:04.82+00:00

Hi !

i made powershell script for create vpn profile on Windows 10 , but this script doesn't work on windows xp , embedded standard and 7 .

our pos system still using windows those windows version. and we need using L2TP client vpn of Cisco Meraki ,

can anyone makes me powershell script for each windows version ?

this is powershell script on windows 10 that is working very well.

$ServerAddress = "123.123.123.123"
$ConnectionName = "VPNTEST"
$PresharedKey = "vpntest"
$Destination = "192.168.33.0/24"
$Destination2 = "192.168.100.0/24"
Add-VpnConnection -Name "$ConnectionName" -ServerAddress "$ServerAddress" -TunnelType L2tp -L2tpPsk "$PresharedKey" -AuthenticationMethod Pap
Set-VpnConnection -Name $ConnectionName -SplitTunneling $True
Add-Vpnconnectionroute -Connectionname $ConnectionName -DestinationPrefix $Destination
Add-Vpnconnectionroute -Connectionname $ConnectionName -DestinationPrefix $Destination2

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,455 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Soccan 16 Reputation points
    2020-08-12T12:54:51.087+00:00

    The cmdlets you are trying to use is only available in certain windows versions, those being Server 2012, 2012R2, 2016 and Windows 10. According to: https://learn.microsoft.com/en-us/powershell/module/vpnclient/add-vpnconnection?view=win10-ps

    To get something working with WinXP will most likely be very tricky, while I would think Google or Bing would be your friend to find something DotNet that you can apply to Windows 7.

    1 person found this answer helpful.
    0 comments No comments

  2. 2020-08-20T01:49:59.037+00:00

    Hi, given that this post has been quiet for a while, this is a quick question and answer. Has your question been solved? If so, please mark it as an answer so that users with the same question can find and get help.
    :)

    0 comments No comments