We help IT Professionals succeed at work.

Reading the event viewer of a remote computer by command prompt

esmail1349
esmail1349 asked
on
Medium Priority
471 Views
Last Modified: 2008-02-01
Hi
Can i Read the event viewer of a remote computer (in local network) by command prompt ?
if yes how ?
Comment
Watch Question

why do you want to use command prompt? as computer management is the good option available.
just right click my computer go to manage- right click computer management (local) and connect to another computer

Author

Commented:
Hi
I want to use it in a batch job
tnx
type the following at prompt or in your batch file:

eventvwr REMOTECOMPUTERNAME
CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018

Commented:
You can do that with Sysinternal's PsLogList (http://www.sysinternals.com/Utilities/PsLogList.html).
Is there something in particular you are trying to accomplish.  You may not be able to via command line, but certainly can by scripting using Win32_NTEventLogFile wmi class.

http://www.windowsitpro.com/Article/ArticleID/20581/20581.html

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_ntlogevent.asp

Otherwise check this perl tool from Microsoft (Eventquery.pl):
http://support.microsoft.com/kb/317381

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Thanks for the points; I hope I helped enough.  Out of curiosity, did you use the wmi scripting suggestion or the eventquery.pl perl tool?

Author

Commented:
hi
i used the following event query in windows 2003 advanced server .
cscript //nologo c:\windows\system32\eventquery.vbs /s ds2 /nh /l application /fo csv /fi "Type eq error"
tnx

Author

Commented:
also
in command prompt ...
and <ds2> is the name of the server
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.