Solved

wmi connection to a remote computer

Posted on 2011-03-03
2
519 Views
Last Modified: 2012-05-11
I'm trying to get the events log from a remote computer, using the following code. I can get the information if I'm working on the computer but not if connected in remote. My local computer is Windows 7 and the remote W2003.

Therefore,  what should I do?
strComputer = "."

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

Open in new window

0
Comment
Question by:Pakhu1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
khaaz earned 500 total points
ID: 35026599
You should try this  (after having set strcomputer, struser, strpassword with the ip address of your remote computer, and a user/password that has access to this computer)


strComputer="192.168.0.10"
strUser="myDomain\adminaccount"
strPassword="adminpassword"

Set WbemLocator= CreateObject("wbemscripting.swbemlocator")
set objWMIService=wbemLocator.connectServer(strComputer,,strUser,strPassword)
	
	

Open in new window

0
 

Author Closing Comment

by:Pakhu1
ID: 35034377
Thank you!!!
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An article on effective troubleshooting
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question