This code does not work. I would appreciate any suggestions. I have to
specify a domain name that is not even in its container otherwise it objects
with errors abotu the method being invalid at GetMethodParame ters. I have
been able to create the zone and nameservers using similar methods without a
problem. I am beginning to wonder if it is even possible.
Dim classInstance20 As New ManagementObjec t( _
"root\Microsoft DNS", _
"MicrosoftDNS_A Type.ContainerN ame='existingdo main.com',DnsSe rverName='serve r.DOMAIN.ds',Do mainName='exist ingdomain.com', OwnerName='www. existingdomain. com',RecordClas s='1',RecordDat a='10.10.10.10' ",
_
Nothing)
' Obtain [in] parameters for the method
Dim inParamsAREC As ManagementBaseO bject = _
classInstance20 .GetMethodParam eters("CreateIn stanceFromPrope rtyData")
' Add the input parameters.
inParamsAREC("C ontainerName") = "abcd.com"
inParamsAREC("D nsServerName") = "server.DOMAIN. ds"
inParamsAREC("I PAddress") = "10.10.10.1 0"
inParamsAREC("O wnerName") = "www"
inParamsAREC("R ecordClass") = 1
inParamsAREC("T TL") = 0
' Execute the method and obtain the return values.
Dim outParamsAREC As ManagementBaseO bject = _
classInstance.I nvokeMethod("Cr eateInstanceFro mPropertyData",
inParamsAREC, Nothing)
ASPNET_MsgBox(" INVALID METHOD HERE")
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
specify a domain name that is not even in its container otherwise it objects
with errors abotu the method being invalid at GetMethodParame ters. I have
been able to create the zone and nameservers using similar methods without a
problem. I am beginning to wonder if it is even possible.
Dim classInstance20 As New ManagementObjec t( _
"root\Microsoft DNS", _
"MicrosoftDNS_A Type.ContainerN ame='existingdo main.com',DnsSe rverName='serve r.DOMAIN.ds',Do mainName='exist ingdomain.com', OwnerName='www. existingdomain. com',RecordClas s='1',RecordDat a='10.10.10.10' ",
_
Nothing)
' Obtain [in] parameters for the method
Dim inParamsAREC As ManagementBaseO bject = _
classInstance20 .GetMethodParam eters("CreateIn stanceFromPrope rtyData")
' Add the input parameters.
inParamsAREC("C ontainerName") = "abcd.com"
inParamsAREC("D nsServerName") = "server.DOMAIN. ds"
inParamsAREC("I PAddress") = "10.10.10.1 0"
inParamsAREC("O wnerName") = "www"
inParamsAREC("R ecordClass") = 1
inParamsAREC("T TL") = 0
' Execute the method and obtain the return values.
Dim outParamsAREC As ManagementBaseO bject = _
classInstance.I nvokeMethod("Cr eateInstanceFro mPropertyData",
inParamsAREC, Nothing)
ASPNET_MsgBox(" INVALID METHOD HERE")
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
Comment