title: Get-EventLog Message Getting a line
body: <p>I was wondering if there is a way to grab information out of the message from <code>Get-EventLog</code>. So far I am using this line of code to get the message:</p>
  
  <pre><code>(Get-EventLog -Logname Security -InstanceId 4625 -Newest 1).Message
  </code></pre>
  
  <p>This is will pull the message from an instance ID of 4625, but the whole message. I would like to grab: <code>Account Name</code> (2nd one), <code>Account Domain</code> (2nd one), and <code>Workstation Name</code>.</p>
  
  <p>Here is a display when the command is run:</p>
  
  <p><a href="https://i.stack.imgur.com/4ZGG2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4ZGG2.png" alt="enter image description here"></a> </p>
  
  <p>The highlighted areas are the things I want to display back. It can be all at once or just issuing a different command for each highlighted. </p>