title: set username and password VPN powershell
body: <p>I have a powershell script where I can add an VPN to the local computer. It prompts for the users credentials and after that it creates the VPN connection and adds the credentials. When I try this on my own computer it works perfectly fine but when I try this on another computer it gives an error saying Set-VpnConnectionUsernamePassword isn't a command. </p>
  
  <p>Does anyone know what causes this or how to fix this.</p>
  
  <pre><code>$creds = $host.ui.PromptForCredential("Need credentials", "Voer de inloggegevens in van de VPN gebruiker", "", "")
      $name = "name of vpn"
      $username = $creds.username
      $plainpassword = $creds.password
      Add-VpnConnection -Name $name -ServerAddress $name -RememberCredential -TunnelType Pptp
      Set-VpnConnectionUsernamePassword -connectionname $name -username $username -password $plainpassword
  </code></pre>