property LookupNS.Server as String
Retrieves or sets a value that indicates the default server.

TypeDescription
String A string expression that indicates the DNS being queried.

The Server property defines the DNS server where the queries are sent. By default, the Server property is the preferred DNS server. Use the DefaultServer property to get the preferred DNS server. Use the Port property to specify the port being used. The TimeOut property gets or sets the length of time until the query times out.

The following sample changes the DNS server and queries for a MX records:

Dim n As New LookupNS
n.Server = "dns1.cp.msft.net"
MsgBox n.Query("microsoft.com").MailExchange