Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

need a powershell script to add in IP addresses into the DNS zone transfer list

Posted on 2014-01-05
5
Medium Priority
?
1,404 Views
Last Modified: 2014-01-06
can someone provide a script that we can run to add (2) IP addresses into the DNS server "zone transfer authorized list"

we have 300+ zones to add these IP's on.

many thanks!

S.
0
Comment
Question by:siber1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 12

Accepted Solution

by:
Chris earned 1500 total points
ID: 39758889
You can easily do this using dnscmd. The following command should achieve what you're after:

dnscmd SourceServerName /ZoneResetSecondaries ZoneName /SecureList DestinationServerIPs

Where:
SourceServerName is the name of the server you're setting the zone transfer settings on.
ZoneName is the name of the zone you're setting the zone transfer settings for.
DestinationServerIPs is a space delimited list of IP address for servers which are allowed to transfer the zone from the source server.
0
 

Author Comment

by:siber1
ID: 39759026
yes, but I need to do this on 300+ zonenames, which is why I was asking for a script that can accomplish this in bulk.

thx
0
 

Author Comment

by:siber1
ID: 39759039
I think this may be a way to automate it.
import-csv records.csv | foreach  {dnscmd SourceServerName /ZoneResetSecondaries /ZoneName /SecureList 10.1.1.1 10.2.2.2 10.3.3.3 10.4.4.4}

Open in new window

0
 

Author Comment

by:siber1
ID: 39759052
when I run the script directly on the master nameserver [one zonename for testing] I get command failed RPC_s_SERVER_UNAVAILABLE 1722 0X6BA
0
 

Author Comment

by:siber1
ID: 39759077
figured it out. need to set the variable in the script to $_.ZoneName

works fine now. thx
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question