Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - WMI ExecQuery from Win32_NTEventLogFile in a Workgroup environment

Reply
 
Old 09-10-2009   #1 (permalink)
darmstrong


 
 

WMI ExecQuery from Win32_NTEventLogFile in a Workgroup environment

Scenario:
- a number of PCs running Windows XP Pro
- all have "Domain" set to "Workgroup" (windows installation default)
- all are logged in as Windows default "Administrator" account
- none of the nodes have Windows Firewall enabled

I have a script that runs on one node and copies files from all the remote
PCs into the folder that the script is run from. This part works fine,
gathering files from both the local and remote nodes, and placing them in
this folder.

I want, however, the gathered files to also include the Windows Event Viewer
..evt exports from all the remote nodes. Here's what I'm using for this:

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup)}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile " _
& "Where LogFileName='System'")
For Each objLogfile in colLogFiles
errBackupLog = objLogFile.BackupEventLog( _
dest & "el-sys-" & node & ".evt")
'WScript.Echo "File saved as c:\scripts\applications.evt"
Next

This works fine for the local node from which the script is being run,
putting its .evt data into the folder. It does not however gather .evt data
from any of the remote nodes across the network.

From the reading I've done, I gather that the problem may relate to being on
a Workgroup vs. a Domain. I've also seen mentioned that it may be getting
forced into a guest login, but I've confirmed that all nodes have this
setting:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"forceguest"=dword:00000000


I would appreciate any ideas as to why this is not working for remote nodes.

Thanks,

David



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Connecting to a remote PC in a workgroup environment VB Script
Left function is EXECQUERY VB Script
Vista in Domain and Workgroup environment Vista General
PS Installation Throughout Environment PowerShell
Win32_NTEventLogFile BackupEventLog: Access denied PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46