Powershell: Accessing Applications and Services Logs

Hi,

for showing or exporting the System, Application and Security Log the command let Get-EventLog is the first choice.

When you want to access an Application or Service log you have to use Get-WinEvent. Some examples:

Get a List of of logs

PS D:\> Get-WinEvent -ListProvider * |Select-Object Name

Looking for a specific log

PS D:\> Get-WinEvent -ListProvider *Update*
Name     : Microsoft-Windows-WindowsUpdateClient
LogLinks : {System, Microsoft-Windows-WindowsUpdateClient/Operational}
Opcodes  : {selfupdate, detect, download, install...}
Tasks    : {Agent, AU}

If you want to access the Windows Update log

PS D:\> Get-WinEvent -ProviderName  Microsoft-Windows-WindowsUpdateClient

Michael

Leave a Reply