logging - methods to collect windows event logs remotely? -


is there method faster wmi available collect windows event logs remotely using powershell? if not,how can make efficient multi-threading wmi-query collecting logs multiple hosts?

look into

get-eventlog 

you can launch in job multithread it:

start-job -argumentlist $hostname { return $(get-eventlog -computername "$($args[0])" -logname application -source "source name") } 

then collect data:

$logs = $(get-job | wait-job | receive-job) 

which this:

foreach($hostname in $hosts) {     start-job -argumentlist $hostname { return $(get-eventlog -computername "$($args[0])" -logname application -source "source name") } }  $logs = $(get-job | wait-job | receive-job) 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -