Learn about Windows PowerShell
Summary: Easily see the newest log entry by using Windows PowerShell.
How can I use Windows PowerShell to quickly check the most recent entry from a classic event log, such as the application, system, or security log?
Use the Get-EventLog cmdlet and specify the –newest parameter, for example:
Get-EventLog application -new 1
Or use the Get-WinEvent cmdlet:
Get-WinEvent application -max 1
Should the example given be as follows
Get-EventLog application -newest 1
Oops. They both work.