Dear professionals,
I just consiger automatic registration about VPN connection with static DNS name server address information by command line (e.g. PowerShell).
Add-VpnConnection -Name $vpnName -ServerAddress $serverAddress -RememberCredential ...
After successful registration with above command, I try to
Set-DnsClientServerAddress -InterfaceAlias $vpnName -ServerAddress SSS.TTT.UUU.VVV
However, an error has occured as "No MSFT_DNSClientServerAddress objects found".
Next, switch the VPN to online, and execute above command. Then DNS server addresses looks affected.
ipconfig /all
PPP Adapter ????:
DNS Servers....:SSS.TTT.UUU.VVV
But it's temporary. So after disconnected and re-connected the VPN connection, that I/F has DNS server address information supplied by DHCP protocol.
ipconfig /all
PPP Adapter ????:
DNS Servers....:DDD.EEE.FFF.GGG <- (supplied by DHCP server)
Let me know how to register the static DNS addresses to VPN connection permanently.
I will appreciate your support.
Max