Problem with Add-VPNConnection to create VPN Phonebook Entry

Welcome Forums General PowerShell Q&A Problem with Add-VPNConnection to create VPN Phonebook Entry

This topic contains 0 replies, has 1 voice, and was last updated by  Jonathan.S 6 months, 2 weeks ago.

  • Author
    Posts
  • #132845

    Participant
    Topics: 1
    Replies: 0
    Points: 13
    Rank: Member

    I'm writing a very simply PowerShell script to create a VPN Phonebook entry for all users on the computer, but I cannot figure out how to enable the option to register this  connection's addresses in DNS.  Microsoft doesn't include that as a switch with Add-VPNConnection, and I am stuck on how else to accomplish this.  I really don't want to simply create a phonebook file (PBK) and push it out.  That is old school, and it will step on existing entries in the PBK file.

    The closest I've come is the following:

    Set-DNSClient -InterfaceAlias 'VPN Name' -RegisterThisConnectionsAddress:$True

    That doesn't really work, though, because the VPN must be connected.  I think it is only temporary for that session, and it isn't really updating the phonebook entry.

    Any ideas?

     

The topic ‘Problem with Add-VPNConnection to create VPN Phonebook Entry’ is closed to new replies.