Quick Fix : DNS Forwarders SBS 2011 Essentials
May 4, 2012 10 Comments
Update – This post will also apply to Windows Server 2012 Essentials
I have seen a number of posts on the forums about people who are having trouble with DNS Resolution on SBS 2011 Essentials.
Sean Daniel posted an excellent explanation of the how’s and whys of Essentials and DNS, and why the Server has a Dynamic IP… <shudder>
Anyway, knowing why something does something, and not being happy with it doing it, are two separate things.
So, if you want to force your DNS Forwarders to be something other than your Default Gateway, or, to use something else instead, you can build a simple scheduled task to do this.
I have written a small PowerShell script to help with this, and you can download it from here.
You can run the task directly from PowerShell, or run it as a Scheduled task.
If you want to run it as a scheduled task you will need to edit the file to switch it to Unattended mode.
Simply change False to True, and enter the IP Addresses you want to set.
On your SBS Essentials Server, you will need to make sure you PowerShell execution Policy is set to RemoteSigned
From an Elevated PowerShell session enter:
Set-ExecutionPolicy RemoteSigned
Then hit Y to confirm.
You will also need to ‘unblock’ the script file when it is downloaded.
Next, open up the Task Scheduler.
Create a Basic Task.
Enter a Name and a description if you like.
Set the task to Start ‘When the Computer Starts’
Chose to ‘Start a Program’
In the program/script path, enter:
Powershell.exe
In the Add Arguments area, enter:
-command %pathtoscript%”
For example i enter:
-command “c:\scripts\SetDnsForwarder.ps1”
Click to open the Properties dialog.
Set to “Run whether use is logged on or not” and “Run with highest privileges”
On the Triggers tab, you can add further schedules if you wish, i added another to run at 12:00 every day.
On the actions tab you can confirm the action the Task will take.
When you are happy click OK, and you will be prompted for your password.
Now you can reboot, and your DNS Forwarders will be set to the value in your script file.
Any reason why you don’t install DHCP and DNS on SBSe so you get a server that behaves in a reasonably intelligent manner?
Hi Ian,
That is a good question.
I have to say on the Essentials installs i have done personally i have not encountered this issue. Or many of the ones people have suffered with in the forums, except the Connector install.
Also installing DHCP puts the server in an UnSupported state with Microsoft (afaik)
I also know of people installing SMTP onto the server in order for it to send out monitoring alerts, which i also have not done personally.
Do you have to install SMTP? I’ve got a plain WS08 R2 server where the task scheduler e-mails me a log file every morning, without having to install anything. PFM?
SBS Essentials monitoring asks for an SMTP sever to use for emailing out alerts, it is not able to use the same mechanism that the Task Scheduler uses. Don’t ask me why!
I personally would like to take note of this particular posting, “Quick Fix
: DNS Forwarders SBS 2011 Essentials Title (Required)” on
my personal website. Will you mind if Ido? Many thanks -Ralph
Regards for composing “Quick Fix : DNS Forwarders SBS 2011 Essentials | Title (Required)” cmpgns .
I personallymay certainly wind up being back again for alot more browsing and writing comments soon.
Thanks a lot, Joey
Hi Robert, I’ve recently applied this fix – step by step – to an Essentials 2011 server, but the script doesn’t do anything. I’ve inserted the required forwarders and even run the script manually. Nothing happens to the registry entry – the old forwarders remain.
are you running ‘as administrator’
Nope, found the problem. I copied and pasted -command “c:\scripts\setdnsforwarders.ps1” into the task but the quotes change to an invalid character. That old chestnut. Just had to correct the quotes. I must have been doing something wrong when running it manually. Sorry for the bother.
no worries.