web analytics

Managing Windows Event Logs using PowerShell Commands

Options

codeling 1599 - 6654
@2021-07-30 11:22:39

The Powershell command New-EventLog can be used to create a new Windows event log and a new event source on a local or remote computer.

New-EventLog
   [-LogName] <string>
   [-Source] <string[]>
   [[-ComputerName] <string[]>]
    [-CategoryResourceFile <string>]
   [-MessageResourceFile <string>]
   [-ParameterResourceFile <string>]
   [<CommonParameters>]

Note: You may need to run the Windows Powershell as Administrator, this will allow you to run above command.

@2021-07-30 11:32:51

Example - Create a new event log

This command creates the TestLog event log on the local computer and registers a new source for it.

New-EventLog -source TestApp -LogName TestLog

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com