5 Replies Latest reply on Feb 6, 2008 6:35 PM by zman

    Can LD push out new DNS settings



      Hi all - Running LD8.7 in a NT4 environment - preparing to upgrade to AD, and need to modify 1100 DNS settings - is this something LD can do?  If not, does anyone have an ideas so we don't have to touch all the boxes.



      Many thanks.



        • 1. Re: Can LD push out new DNS settings
          mrspike SSMMVPGroup


          We used a VBS script to change our WINS on clients,  we pushed it out with Landesk, I think you can do similar for DNS, not sure.



          (replace xxx.xxx.xxx.xxx with your IP)









          On Error Resume Next


          strComputer = "."

          Set objWMIService = GetObject("winmgmts:" _

              & "{impersonationLevel=impersonate}!
          " & strComputer & "\root\cimv2")


          Set colNetCards = objWMIService.ExecQuery _

              ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")


          For Each objNetCard in colNetCards

              strPrimaryServer = "xxx.xxx.xxx.xxx"

              strSecondaryServer = "xxx.xxx.xxx.xxx"

              objNetCard.SetWINSServer strPrimaryServer, strSecondaryServer




          • 2. Re: Can LD push out new DNS settings
            Jared Barneck SupportEmployee

            You can do this with Window's NETSH tool.  Just find the netsh commands and throw them in a text file.


            So are you saying the clients are using Static DNS settings instead of DHCP?


            Do you want them to continue to use Static DNS settings or do you want them to move to DHCP?


            You can do both a with a NETSH script.  You can probably get the syntax you need simply by running the following command on a workstation:

            NETSH dump > c:\myscript.txt

            You can analyze that script and get a feel for the syntax as well as research a little of the NETSH syntax on Microsoft's site.


            Once you create the script that works, I believe you can push it in a batch file package fairly easy, just include the script as an additional file


            REM My Batch file
            NETSH -f MyNetshScript.txt


            • 3. Re: Can LD push out new DNS settings
              zman Master


              I agree with Jared use Netsh. We did this a while back in our shop and you can script it with VB or Autoitscript, but we had the most success with Netsh.  Here are some links to get you started:






              Configure TCP/IP from the Command Prompt



              Windoze Technet









              It is also a good tool to get familiar with, becuase you can use it to reset corrupt or damaged IP configs  (spyware).



              • 4. Re: Can LD push out new DNS settings
                Jared Barneck SupportEmployee



                When you have successfully accomplished this task, please post the method you used.  Maybe even write your own document on it.

                • 5. Re: Can LD push out new DNS settings
                  zman Master

                  By chance just had to convert about 50 machines from static to dynamic dns this evening.  Very simple, create a batch file with this line:


                  netsh interface ip set dns "Local Area Connection" dhcp