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

extract data from event log

$
0
0

I can get errors from the event log like this: Get-Eventlog system -Newest 1000  -ComputerName $Machine | where {$_.entryType -Match "Error"}   this gives me errors but not from the location I need.  

I can also change system to application, security or setup.    My issue is I need to get log file information from Event Viewer \ Applications and Services Logs \ Microsoft \ Group Policy \ Operational

I know from my own machine I have an error in this log location with an Event ID of 7007.  I've tried to run this and it fails.  get-eventlog -log system -source 'group policy' | where {$_.eventID -eq 7007}

How can I extract out "all" errors, warnings from this Operational log file location?  


Viewing all articles
Browse latest Browse all 6937

Trending Articles