How to switch between DNS suffixes using CMD (netshell)?

2

1

at my job, I have to manually switch between:

1) append primary and connection specific DNS suffixes and

2) Append parent suffixes of the primary DNS suffix

a bunch of times per day (due to a secure network). I'd like to create a .bat to do it automatically, but I can't find the correct Netshell command to do it...

Do you know how can i switch between those options?

Here's a screenshot:

Van Gómez

Posted 2014-07-11T23:42:05.553

Reputation: 21

Answers

0

Unfortunately, there is no netshell command for this. However, the list is stored in the registry under this path:

HKLM\System\CurrentControlSet\Services\Tcpip\Parameters

You can use the following command from the command line to set the list values:

reg add HKLM\System\CurrentControlSet\Services\Tcpip\Parameters /v "SearchList" /d "example1.com,example2.com" /f

Note that the "list" is a comma-separated string, so replace example1.com,example2.com with your suffixes.

To revert back to the option "Append primary and connection specific DNS suffixes", simply set the list (the value after /d) to an empty string ("").

Reyhn

Posted 2014-07-11T23:42:05.553

Reputation: 101