Re: check remote computer name through it's IP



Jeremy wrote:
You might also need admin privilege on the remote computer.

"Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx> wrote in message news:uXQTA3NnHHA.596@xxxxxxxxxxxxxxxxxxxxxxx
To handle as many situations as possible, try:

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _
& strComputer & "\root\cimv2")

Otherwise, either the remote computer (or your computer) does not have WMI installed (older than Windows 2000), WMI is corrupt, or WMI is blocked by a firewall. Of course, this assumes the remote computer is online and you have connectivity, which should be the case if you can ping it.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--

"Golden_au" <Goldenau@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:7408BB90-EC4E-4A00-8DBA-79FCBDF48ED2@xxxxxxxxxxxxxxxx
Thanks Jeremy and Richard, your scripts iare very helpfull, but my request is
a bit more, I need to retry the remote computer name. but maybe it is the
firwall issue, I got error on Jeremy's script regarding "The remote server
machine does not exist or is unavailable:'GetObject'. is their anyway to
overcome this issue?
--
Golden_au


"Richard Mueller [MVP]" wrote:

Golden_au wrote:

> Is there anyway to check remote computer name if I only know the ip
> address
> by vbscript.

I link three VBScript programs that ping remote computers to see if they
respond on this page:

http://www.rlmueller.net/PingComputers.htm

You normally ping by computer NetBIOS name, but you can also ping by IP
address with all three. The one you select depends on your OS and WSH
version. However, they will not return the NetBIOS name of the computer,
only that they are available. The code posted previously using WMI is
probably the best way to retrieve the name. However, if the computer is not
available (turned on and authenticated to the domain, no need for a user to
be logged on), there will be a timeout. The WMI timeout, which is several
seconds, can be avoided by first pinging the computer and only attempting to
connect with WMI if the machine responds. Also, note that only computers
with Windows 2000 will have WMI installed by default.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--







He'd be receiving an access denied message if that were the case, but good thought.

Trevor Sullivan
MCP
http://develnet.blogspot.com
.



Relevant Pages

  • RE: Downloading Problem
    ... Event Type: Error ... WMI Windows Management Instrumentation ... The Windows Security Center Service has started. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Access is Denied after Win2K to XP Upgrade
    ... Repairing and re-registering the WMI ... MS-MVP Windows Shell/User ... Network Connections folder won't work right. ... A network error occurred in connecting to Windows Management ...
    (microsoft.public.windowsxp.setup_deployment)
  • RE: WMI Error
    ... Yes, try to look for third-party, like the Add-Ons mentioned in my earlier ... About Turning OFF the DEP protection, you can if you have a Good Anti-Virus ... P.S does starting the WMI service change any thing?. ... Turn on DEP for essential windows programs and services only. ...
    (microsoft.public.windowsxp.general)
  • Re: WMI files missing or corrupted
    ... The Windows Security Center was unable to establish event queries with WMI ... You can access Event Viewer by selecting Start, Administrative Tools, and ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: processor is experiencing a low level of idle time
    ... wmiprvse.exe is the instance of Windows Management Instrumentation. ... Management Instrumentation (WMI) is a component of the Microsoft Windows ... normal that it takes 10~15% of CPU time. ...
    (microsoft.public.windows.server.sbs)