powershell - grep string from Message in Get-WinEvent -


i have script check event logs get-winevent, need show complete results of get-winevent output based on search string message column.

is there way grep message column in get-winevent

this current string

get-winevent -computername $target_machine -filterhashtable $params 

you can pipeline output where-object, see example below:

$searchstring="autoconfig"                                                                                                                                                                              get-winevent microsoft-windows-wlan-autoconfig/operational | where-object{$_.message -like "*$searchstring*"}     

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -