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
1 | PS D:\> Get-WinEvent -ListProvider * |Select-Object Name |
Looking for a specific log
1 2 3 4 5 | PS D:\> Get-WinEvent -ListProvider *Update*Name : Microsoft-Windows-WindowsUpdateClientLogLinks : {System, Microsoft-Windows-WindowsUpdateClient/Operational}Opcodes : {selfupdate, detect, download, install...}Tasks : {Agent, AU} |
If you want to access the Windows Update log
1 | PS D:\> Get-WinEvent -ProviderName Microsoft-Windows-WindowsUpdateClient |
Michael