title: Backup Event Logs via Powershell and WMI
body: <p>I have Powershell script that makes backups of all Event logs on current localhost.</p>
  
  <p>It runs from Task Scheduler with "Run with highest privileges" under restricted account (this account only has Backup Operator rights). Script itself can be found <a href="http://lab.technet.microsoft.com/en-us/magazine/dd822908" rel="nofollow">here</a></p>
  
  <p>OS: Windows Server 2008 R2, UAC is turned off.</p>
  
  <p>The problem appears in the following line:</p>
  
  <pre><code>$Eventlogs = Get-WmiObject -Class Win32_NTEventLogFile -ComputerName $computer 
  </code></pre>
  
  <p>In returned collection of Event logs <strong>Security log is missing</strong> and as result isn`t backuped. All other are present.</p>
  
  <p>If the same script is run directly from Powershell using the same account - Security log is present.
  Granting local Admin rights to account solves the issue but isn`t applicable.</p>
  
  <p>Do you have any ideas what may be causing such behaviour? Appreciate any help!</p>