![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
![]() |
| 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 | |||