VB/WMI to edit DNS CNAME

Discussion in 'Visual Basic ( VB )' started by kharold, Jul 14, 2008.

  1. kharold

    kharold New Member

    Joined:
    Jul 14, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    All:

    I am having a bit of a problem locating a decent example of how to implement MicrosoftDNS_ResourceRecord class / MicrosoftDNS_CNAMEType to edit a CNAME on my DNS server.

    I essentially need a VB Script that will utilize WMI to edit a CNAME on my DNS servers named "ActiveDB" with a FQDN of "db1.example.com". I know how to use DNScmd to edit, but I would highly prefer to use WMI.

    Can someone please provide an example of how to either:
    a) Update the DNS CNAME record, or,
    b) Delete the CNAME, then recreate it with the new FQDN?

    Any assistance would be greatly appreciated.
    Thanks,
    Ken
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice