Search code examples
windowspowershellwindows-10event-log

How to use powershell command get-WindowsUpdateLog to collect application logs only


I'm migrating a project from Windows 7 to Windows 10. The project uses Wevtutil.exe to collect system/application logs and it works fine in Windows 7. However, I got recommended to use get-WindowsUpdateLog in windows 10 to achieve the same result. Just wondering if there is any difference between application/system logs and Windows update logs? I've been searching online but found no answers so far.

In addition, assuming that Windows update logs is a super set of application/system logs, is it possible to filter through the result of get-WindowsUpdateLog and collect only a subset of it (e.g. application logs)?

Thanks in advance.


Solution

  • So, as per out discussion in the comments, here's what looks to be the answer:

    Get-EventLog -LogName Application ... | Out-File path
    

    You could also use several other methods to export data and keep it structured (export-csv, export-clixml).
    Read more about Event Tracing for Windows (ETW).