Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DNS Server issue

1 view
Skip to first unread message

Ali AYEN

unread,
Feb 14, 2004, 6:17:07 AM2/14/04
to
I am trying to script DNS server.

When I create a new Zone, my computer name is added as default name server.

But I want to delete this entry and add my ones.

I write this to delete Default name server,

Set objDNS = objWMIService.Get("MicrosoftDNS_NSType.OwnerName=""" & strOwner
& """")
objDNS.Delete_

But gives me following error:

Error: Invlid object path
Kod: 8004103A
Source: SWbemServicesEx

How can I solve this problem?

Thank you very much.

Ali AYEN


Ali AYEN

unread,
Feb 14, 2004, 6:48:17 AM2/14/04
to
I do not know what is the magic but when I write my problem here, I find my
solution myself in a short time.

Set defServers = objWMIService.ExecQuery ("Select * from MicrosoftDNS_NSType
Where OwnerName = '" & strOwner & "'")
For Each objDefSrv in defServers
objDefSrv.Delete_
Next

Thanks all!

Ali AYEN

"Ali AYEN" <a...@aliayen.com>, iletide şunu yazdı
news:OBCSRvu...@TK2MSFTNGP12.phx.gbl...

0 new messages