Hi I'm working on the following script to try and deploy Meraki VPN to client computers but not having much luck with the pre-configured user account which i have set up via Meraki Portal as a guest account: Set-ExecutionPolicy Unrestricted $User = "Bob@123.com" $PWord = ConvertTo-SecureString -String "Bob123" -AsPlainText -Force $compIP = "server address" $VPNPresharedKey = "key" $EncryptionLevel = "Required" $RememberCredential = $true $vpnnamn = 'MerakiVPN' $SplitTunnel = $true $RegistryPath = "HKLM:\System\CurrentControlSet\Services\PolicyAgent" $RegName = 'AssumeUDPEncapsulationContextOnSendRule' $Regvalue = 2 New-ItemProperty -Path $RegistryPath -Name $RegName -Value $Regvalue -PropertyType DWORD -Force $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord Add-VpnConnection -Name "$vpnnamn" -ServerAddress "$compIP" -TunnelType L2tp -AllUserConnection -L2tpPsk "$VPNPresharedKey" -AuthenticationMethod Pap ,MSChapv2 -EncryptionLevel Required -Force Set-VpnConnection -AllUserConnection -Name $vpnnamn -SplitTunneling $true -RememberCredential $RememberCredential -IdleDisconnectSeconds $IdleDisconnect I have gathered a lot of the commands through various forums as i'm still a novice with powershell but the bit that is failing for me is the username and password not showing up under the connection properties after the VPN connection has been added. Both username and password boxes are blank. Any ideas? Thanks in advance
... View more