Guest User

Untitled

a guest
Mar 6th, 2020
1,381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set-ExecutionPolicy Unrestricted # Allows scripts to be run if cust exec policy is still active despite running as admin,
  2.  
  3.  
  4. $InstallationPath = "C:\Program Files (x86)\My Company\Company Product\Product.exe.Config"
  5.  
  6. ##newDBinfo - Edit this:
  7. $User = "" #Enter User here e.g Bob
  8. $PWord = ConvertTo-SecureString -String "Password123" -AsPlainText -Force #Enter the password in plain text here
  9. $compIP = "Enter Customer IP here" # Enter cust instance Public IP here
  10. $VPNPresharedKey = "Enter Customer preshared key here" # Enter cust Pre Shared key here
  11.  
  12.  
  13.  
  14.  
  15.  
  16. $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord
  17.  
  18. Add-VpnConnection -Name $User -ServerAddress $compIP -TunnelType L2tp -L2tpPsk $VPNPresharedKey -RememberCredential  #-AuthenticationMethod Pap
Advertisement
Add Comment
Please, Sign In to add comment