title: How to determine if an EventLog already exists
body: <p>I'm using the following line to create a new event log</p>
  
  <pre><code>new-eventlog -LogName "Visual Studio Builds" -Source "Visual Studio"
  </code></pre>
  
  <p>I want to run this every time, because if I run a build from a new computer, I'd still like to see the event logs.</p>
  
  <p>The problem is that every time the script is run after the log is already created, it throws an error.</p>
  
  <pre class="lang-none prettyprint-override"><code>New-EventLog : The "Visual Studio" source is already registered on the "localhost" computer.
  At E:\Projects\MyApp\bootstrap.ps1:14 char:13
  + new-eventlog &lt;&lt;&lt;&lt;  -LogName "Visual Studio Builds" -Source "Visual Studio"
      + CategoryInfo          : InvalidOperation: (:) [New-EventLog], InvalidOperationException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.NewEventLogCommand
  </code></pre>
  
  <p>Now I know that I can "search" for the event log</p>
  
  <pre><code>Get-EventLog -list | Where-Object {$_.logdisplayname -eq "Visual Studio Builds"} 
  </code></pre>
  
  <p>But now how do I determine if it exists?</p>