Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Get-Event

Get-Event - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Get-Event


Short description
Gets the events in the event queue.

Syntax
Get-Event [-EventIdentifier] <int> [<CommonParameters>]

Get-Event [[-SourceIdentifier] <string>] [<CommonParameters>]

Description
The Get-Event cmdlet gets events in the Windows PowerShell event queue for the current session. You can get all eve
nts or use the EventIdentifier or SourceIdentifier parameters to specify the events.

When an event occurs, it is added to the event queue. The event queue includes events for which you have registered
, events created by using the New-Event cmdlet, and the event that is raised when Windows PowerShell exits. You can
 use Get-Event or Wait-Event to get the events.

This cmdlet does not get events from the Event Viewer logs. To get those events, use Get-WinEvent or Get-EventLog.