title: Identify first and last event from an event log .net or powershell
body: <p>I am trying to find the first and last event timestamp in offline evtx files. I am trying to use the EventLogReader.Seek Method (SeekOrigin, Int64) with powershell. I know how to find the Events based on event id as below. </p>
  
  <pre><code>$reader = [Diagnostics.Eventing.Reader.EventLogReader]::new(
      [Diagnostics.Eventing.Reader.EventLogQuery]::new($eventLogPath,
          [Diagnostics.Eventing.Reader.PathType]::FilePath, $query)
  )
  </code></pre>
  
  <p>how would I find the first and last events in a query similar to above? Thanks</p>