Create EventLogs using Powershell

Create container for logs:

New-EventLog -logname 'Event Log Name' -source 'logsourcename'

Note: Must be run in elevated powershell window

Command to create event log:

Write-EventLog -computername localhost -logName 'Event Log Name' -EventID 5000 -Message "Hello World!" -EntryType Information -source logsourcename

Finding newly created event log:
Open Server Manager

Expand Diagnostics

Expand Event Viewer

Expand Applications and Services Logs

Click on the container that you named using the -logName parameter
Your Logs should be in the right pane.

Leave a Reply

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

You are commenting using your 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: