Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

filter the event message output

$
0
0

I have a small script below and need to know how to truncate the output of message field to show only

New Logon:   Account Name

Network Information:  Source Network Address

======================================================

$filter=@{
      logname='Security'
      ID=4624}

get-winevent -FilterHashTable $filter -computername dcname -MaxEvents 1

======================================================

Thanks in advance.

JB


Viewing all articles
Browse latest Browse all 6937

Trending Articles