Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Type Mismatch error on DNS capture... HELP please
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Microsoft  
View profile  
 More options Nov 13 2009, 1:44 pm
Newsgroups: microsoft.public.scripting.vbscript
From: "Microsoft" <paulo_mati...@yahoo.com.br>
Date: Fri, 13 Nov 2009 11:44:26 -0200
Local: Fri, Nov 13 2009 1:44 pm
Subject: Type Mismatch error on DNS capture... HELP please
Hello,

Does anybody can help me on this issue please?
I did write a script to capture server primary and secondary DNS through WMI
class, it is working properly with many servers in my environment, but for
some reason that I don't know, it is stopping during execution at line 23
char 30, Error: Type mismatch, code: 800A000D, for some servers, all servers
are in the same domain, with the same architeture, I cannot identify where
VB is getting this error, also I've try with IP address and DNS name, same
problem.

here is the script.

Option Explicit
Dim DNS1, DNS2, objFSO, objFileName, objOutputFile, objMPCLIScript, sptLine,
strIPAddress,strLocation, strLogin, strPassword, objPing, strDC1, strDC2,
objWMIService
Dim colNICConfigs,oSocket, iErr, sSocketText, TelNetConfigure, objShell,
objScriptExec, objRetStatus, objNICConfig, strServerName, NIC, server
Dim inputServerName, inputLocation, inputRsaLogin, inputRsaPass,
inputUserID, inputUserPass, localFolder, testStr
strServerName = "<ServerName>"
on error resume next
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"
& strServerName & "\root\cimv2")
                   If Err <> 0 Then
                     msgbox strServerName & " - Unable to connect to the
root: " & Err.Number & " - " & Err.Description
                      Err.Clear
                   Else
                        Set colNICConfigs = objWMIService.ExecQuery("SELECT
DNSServerSearchOrder, Description, IPAddress FROM
Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
                       If Err <> 0 Then
                     msgbox strServerName & " - " & "Unable to connect to
the class Win32_NetworkAdapterConfiguration: " & Err.Number & " - " &
Err.Description
                          Err.Clear
                       Else
                              For Each objNICConfig In colNICConfigs
                                  If Left (objNICConfig.Description, 3) <>
"WAN" Then
                                     NIC = objNICConfig.Description & " - "
& Join (objNICConfig.IPAddress, ",")
                                     DNS1 =
objNICConfig.DNSServerSearchOrder(0)
                                     DNS2 =
objNICConfig.DNSServerSearchOrder(1)
                                End If
                                testStr = DNS1 & " ;;;; " & DNS2
                                Exit For
                              Next
                       End IF
                   End If

                   wscript.echo testStr

Thank you.

Paulo Matioli


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google