title: Coloring array filters in PowerShell
body: <p>Trying to figure out how to color certain filters within an array for ease of reading on console. In other words, as the console progress forward, if &quot;[Behaviour] OnPlayerJoined&quot; appears, color that text green.</p>
  <pre><code>$filters = @(
  ################## FILTERS ##################
  &quot;[Behaviour] OnPlayerJoined&quot;,
  &quot;[Behaviour] OnPlayerLeft &quot;,
  &quot;[API] Received Notification: &lt;Notification&quot;
  #############################################
  )
  mode 300
  $host.UI.RawUI.ForegroundColor = &quot;White&quot;
  $host.UI.RawUI.BackgroundColor = &quot;Black&quot;
  cd C:\Users\$env:UserName\AppData\LocalLow\VRChat\VRChat
  $taco = Get-ChildItem -Attributes !Directory . | Sort-Object -Descending -Property LastWriteTime | select -First 1
  Get-Content -Path $taco.name -Wait | Select-String -Pattern $filters -SimpleMatch
  </code></pre>