|
|
 |  |
Re: Script to Delete a Particular NS Record?From: Men & Mice Support Date: Friday, June 11, 2004
Time: 11:06:44 amIt could be done with AppleScript. But if you have QuickDNS 4.6.1,
you could simply use the Search Assistant, which is available from
the Edit menu.
Otherwise, here's an AppleScript that should work for you:
____________________________________________________________________
set targetName to "old-dns.example.com."
tell application "QuickDNS Manager"
set theZones to (the name of every zone whose type is master) as list
if theZones is {} then tell me to quit
repeat with theZone in theZones
set theZone to theZone as text
set theDoc to (open zone theZone)
tell theDoc
set numRecs to the count of (every NS record)
repeat with i from numRecs to 1 by -1
set theServer to the server name of NS record i
if theServer does not end with "." then
set theServer to theServer & "." & theZone
end if
if theServer is targetName then
delete NS record i
end if
end repeat
if modified then
try
set theComment to "Deleted NS record for " & targetName
save with comment theComment
close
end try
end if
end tell
end repeat
end tell
____________________________________________________________________
Chris Buxton Men & Mice
Customer Support Specialist Making DNS Easy
At 9:48 AM -0700 6/11/04, Warren Michelsen wrote:
>I need to delete a particular NS record (containing a particular
>value) from all my zones. Does anyone have an AppleScript to do this?
>
>I see script examples for adding and modifying records, but not for
>deleting them.
>
>Anybody?
|

Return to Digital Point Solutions' Home Page |