HI,
There is a GPO setting to specify DNS resolver:
please don't forget to mark this reply as answer if it help you to fix your issue
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello everyone
I need to modify the dns registers via gpo only to the computers that have a static ip excluding the computers that are found via DHCP.
It must be in the following order
First: IP 1.1.1.1
Second: IP 1.2.3.4
Third: IP 2.2.2.2
Current Scenario:
First: IP 1.2.3.4
Second: IP 2.2.2.2
thanks
HI,
There is a GPO setting to specify DNS resolver:
please don't forget to mark this reply as answer if it help you to fix your issue
Hi ,
Based on my understanding, you want to modify DNS server via GPO only for those static IP computers. You don't want to modify DNS server for DHCP-assigned computers. Is that right? Please feel free to let me know if my understanding is wrong.
Group policies can assigned to the Active Directory organizational unit (OU) in which the computer or user are placed. So if my understanding is right, you can divide those static IP computers into a separate OU in advance and push the GPO settings.
If your static IP computers and DHCP-assigned computers are in the same OU, then you could split static IP computers into a different security group. Add the specified security group and only give this security group read and apply group policy permission. Then GPO settings will only apply to this specified security group.
For how to set DNS servers via GPO, you can refer to the following article:
Set DNS servers via GPO Server 2012 R2
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
--------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hi,
there is no way to do it via command or script to all user computers excluding dhcp computers?
thanks
Hi ,
there is no way to do it via command or script to all user computers excluding dhcp computers?
There is no simple command can achieve your goal. Since I am not an expert in scripting, I am not sure whether you can do it via script. You might need to write a complex script.
--------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
You sure can. Run on each computer (locally or remotely)
Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE | Where-Object {!$_.DHCPEnabled} | ForEach-Object { $_.SetDNSServerSearchOrder('8.8.8.8','8.8.8.4')}
or something along these lines.