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
Post a Comment