Does anyone know if it's possible and if so how to modify a host A record's
ip address using DNSCMD.exe ? I can see how to add and delete using the
/RecordAdd and /RecordDelete switches but no modify ?!
dnscmd /RecordAdd will not generally perform a replace. (Although it does
for the SOA record type.)
Here's a quick example:
D:\>dnscmd /RecordAdd foo.com test A 1.1.1.1
Add A Record for test.foo.com at foo.com
Command completed successfully.
D:\>dnscmd /EnumRecords foo.com test
Returned records:
@ 3600 A 1.1.1.1
Command completed successfully.
D:\>dnscmd /RecordAdd foo.com test A 2.2.2.2
Add A Record for test.foo.com at foo.com
Command completed successfully.
D:\>dnscmd /EnumRecords foo.com test
Returned records:
@ 3600 A 1.1.1.1
3600 A 2.2.2.2
Command completed successfully.
D:\>dnscmd /RecordDelete foo.com test A
Are you sure you want to delete record? (y/n) y
Deleted A record(s) at foo.com
Command completed successfully.
D:\>dnscmd /RecordAdd foo.com test A 3.3.3.3
Add A Record for test.foo.com at foo.com
Command completed successfully.
D:\>dnscmd /EnumRecords foo.com test
Returned records:
@ 3600 A 3.3.3.3
Command completed successfully.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.