web analytics

Managing Windows Event Logs using PowerShell Commands


codeling 1595 - 6639
@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.

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

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


You must Sign In to comment on this topic.

© 2024 Digcode.com