Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » Write-EventLog

Write-EventLog - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Writes an event to an event log.

Write-EventLog [-LogName] <String> [-Source] <String> [-EventId] <Int32> [[-EntryType] <EventLogEntryType>] [-Message] 
<String> [-Category <Int16>] [-ComputerName <String>] [-RawData <Byte[]>] [<CommonParameters>]

The Write-EventLog cmdlet writes an event to an event log.

To write an event to an event log, the event log must exist on the computer and the source must be registered for the e
vent log.

The cmdlets that contain the EventLog noun (the EventLog cmdlets) work only on classic event logs. To get events from l
ogs that use the Windows Event Log technology in Windows Vista and later versions of Windows, use Get-WinEvent.