Powershell: create Windows event log

Create a NT eventlog for testing event monitor or rules:

Write-Eventlog -Logname ‘Application’ -Source ‘Hyperion EPMA DimensionServer’ -EventID 0 -EntryType Error -Message “This is a test of Gustavo Mendez (SCOM)”

 


 

More informationhttp://technet.microsoft.com/en-us/library/hh849847.aspx

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

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


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: