Translate WMI create MX record to .NET RRS feed

  • Question

  • User-1520202181 posted
    Hi, I want create a DNS MX record. I was find this code in technet in WMI vbscript and i can't translate fine to vb.net. can you help me? The original code is %%%%%%%%%%%%%%%%%%% Set objWMIService = GetObject("winmgmts:\\computer\root\MicrosoftDNS") Set objItem = objWMIService.Get("MicrosoftDNS_MXType") errResult = objItem.CreateInstanceFromPropertyData _ (strDNSServer, strContainer, strOwner, intRecordClass, intTTL, intPreference, strMailExchanger) %%%%%%%%%%%%%%%%% I think that the line "Set objWMIService = GetObject("winmgmts:\\computer\root\MicrosoftDNS")" is in vb.net "Dim conexiondns As New ManagementObject("\\computer\root\MicrosoftDNS")" thanks MAYC
    Saturday, February 28, 2004 6:29 AM

All replies

  • User-635331998 posted
    Did you get the answer? I am looking for the same
    Friday, March 23, 2007 3:09 AM