/build/static/layout/Breadcrumb_cap_w.png

I am running a script to set DNS to connect to our domain, but once it connects I need DNS to go back to automatic, is there a way to automate this with KACE?

I am currently running 2 post installation tasks on my one of my images. We use KACE to image both school and town side, which are different domains. To connect to the town side, I need to hard code DNS into the system then connect to it. I have found a script that allows me to set DNS, and then join the domain. However, I need to switch the DNS back to automatic after it has been added to the domain, is there a way to do this? Is there a way to have the system go back and click the automatic radio button in iPv4 properties? I am still new and learning how to use all of this effectively, thanks for any feed back you can provide.


0 Comments   [ + ] Show comments

Answers (2)

Posted by: SMal.tmcc 4 years ago
Red Belt
2

Keep it simple

Create a GPO to set the DNS when they join the domain.

Posted by: Channeler 4 years ago
Red Belt
-2

Down there is a Powershell Script designed to switch back the DNS to automatic.

https://devblogs.microsoft.com/scripting/weekend-scripter-modify-dns-settings-via-windows-powershell/

The problem is you are going to need to know the name of the network adapter you want to modify.

The KACE SDA is able to run Powershell scripts as post install tasks.

I will add it here in case that page goes down someday, but all credits to them
This script will set the DNS setting to automatic for the network adapter. If you want... after running the command, run Get-DnsClientServerAddress to confirm the change to the DNS servers. When the DNS setting is set to automatic, the ServerAddress column is blank for the adapter.

Set-DnsClientServerAddress -InterfaceAlias wi-fi -ResetServerAddresses

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ