PC Review


Reply
Thread Tools Rate Thread

how to delete DNS A type record using Script/WMI

 
 
Samir Pandey
Guest
Posts: n/a
 
      9th Jun 2004
Hello,

I am using the following code to create a A type DNS record.

Dim objMgmScope As New
ManagementScope("\\DNSServer\root\MicrosoftDNS")
Dim objPath As New ManagementPath("MicrosoftDNS_AType")
Dim objOptions As New ObjectGetOptions
Dim objClass As New ManagementClass(objMgmScope, objPath, objOptions)
Dim inParams As ManagementBaseObject =
objClass.GetMethodParameters("CreateInstanceFromPropertyData")
inParams("DnsServerName") = DNSServer
inParams("ContainerName") = DNSZone
inParams("OwnerName") = ResourceName
inParams("IPAddress") = IPAddress
Dim outParams As ManagementBaseObject =
objClass.InvokeMethod("CreateInstanceFromPropertyData", inParams,
Nothing)

This works just perfect.
Now how can i delete such record using a similar script. I cann't find
any solution on Microsoft site or rather anywhere.

thanks,
Samir
 
Reply With Quote
 
 
 
 
Chaitan
Guest
Posts: n/a
 
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Double Click record in cont. form and delete the record Anne Microsoft Access Form Coding 4 31st Dec 2009 02:27 PM
Prevent Subform from saving record or delete record when moving tomain form RussCRM Microsoft Access Form Coding 0 3rd Apr 2008 07:26 PM
Re: Add / Delete record from table - How to reposition selected record in datagridview??? Cor Ligthert[MVP] Microsoft VB .NET 0 31st Mar 2008 05:26 AM
Upon delete record, conditional delete record from another table =?Utf-8?B?UmljaDEyMzQ=?= Microsoft Access 6 14th Oct 2005 02:48 PM
Delete Button shows previous record before current record is delet =?Utf-8?B?UmljaDEyMzQ=?= Microsoft Access Forms 8 10th Oct 2005 01:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:23 PM.