You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loop through a list of specified domain controllers, and then loop through all DNS Server zones on each domain controller to make desired changes.
3
+
Loop through a list of specified domain controllers, and then loop through all DNS Server zones on each domain
4
+
controller to make desired changes.
4
5
5
6
.DESCRIPTION
6
-
This script was written to change the Secondary Servers setting and the SecureSecondaries setting on all DNS zones on all DNS Servers (all domain controllers,
7
-
in our environment.) It provides an ideal way to adjust settings for one (or all) zones across every zone server, because some settings are stored individually
8
-
in each server's registry, and not completed replicated, even when the zone is AD-integrated.
7
+
This script was written to change the Secondary Servers setting and the SecureSecondaries setting on all DNS zones on
8
+
all DNS Servers (all domain controllers, in our environment.) It provides an ideal way to adjust settings for one (or
9
+
all) zones across every zone server, because some settings are stored individually in each server's registry, and not
10
+
completed replicated, even when the zone is AD-integrated.
9
11
10
-
Our servers actually havce Remote Registry access disabled, so the remote part of this script will not work, but the inner loop beginning with the collection
11
-
of zones ("$zones = Get-ChildItem ...") from the registry can be run manually on each DNS Server, still saving time and providing more accuracy than multiple
12
-
manual changes could.
12
+
Our servers actually have Remote Registry access disabled, so the remote part of this script will not work, but the
13
+
inner loop beginning with the collection of zones ("$zones = Get-ChildItem ...") from the registry can be run manually
14
+
on each DNS Server, still saving time and providing more accuracy than multiple manual changes could.
13
15
14
16
.NOTES
15
-
Be sure to test your changes first by using -WhatIf on the Set-ItemProperty cmdlets, and also by testing your changes manually with at least one zone. Check the
16
-
registry and the GUI after running your script, and note that changing some zone settings via the registry will require the DNS Server service to be restarted
17
-
in order for those changes to be read and take effect.
17
+
Be sure to test your changes first by using -WhatIf on the Set-ItemProperty cmdlets, and also by testing your changes
18
+
manually with at least one zone. Check the registry and the GUI after running your script, and note that changing some
19
+
zone settings via the registry will require the DNS Server service to be restarted in order for those changes to be read
20
+
and take effect.
18
21
#>
19
22
20
23
if ($session) { Remove-PSSession$session }
21
24
22
25
#Specify a list of DNS servers manually, or just get a list of all domain controllers in the domain.
#Loop through each server in the list, opening a PowerShell remoting session, then show the name and status of the session. Skips (continue) to the next server if a connection fails.
0 commit comments