Guys
I am using the script below which I obtained from and it works fine for exporting the Event Log on the local server you run the script on but if you change strComputer to a remote server it doesn't work?
The server I am running the script from is a domain member server and I am logged in using a Domain Admins account. Is there something I am missing?
TIA
--------------------------------------
"Insert funny comment in here!"
--------------------------------------
I am using the script below which I obtained from and it works fine for exporting the Event Log on the local server you run the script on but if you change strComputer to a remote server it doesn't work?
Code:
strComputer = "REMOTESERVER"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup)}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile " _
& "Where LogFileName='Application'")
For Each objLogfile in colLogFiles
errBackupLog = objLogFile.BackupEventLog( _
"c:\scripts\application.evt")
WScript.Echo "File saved as c:\scripts\applications.evt"
Next
The server I am running the script from is a domain member server and I am logged in using a Domain Admins account. Is there something I am missing?
TIA
--------------------------------------
"Insert funny comment in here!"
--------------------------------------