You are currently viewing PowerShell Remove-EventLog Cmdlet

PowerShell Remove-EventLog Cmdlet

PowerShell Remove-EventLog Cmdlet

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed Clear-EventLog cmdlet in PowerShell.

https://cloudaffaire.com/powershell-clear-eventlog-cmdlet/

In this blog post, we will discuss Remove-EventLog cmdlet in PowerShell. You can use Remove-EventLog cmdlet to delete an event log file. Remove-EventLog cmdlet can also be used to unregister an event source from an event log. You need to have administrator access to order to delete an event log or unregister its source. You can use Remove-EventLog cmdlet to delete the event log of a local or remote computer.

Note: This cmdlet has the potential to cause trouble for your OS or application, hence use carefully.

Remove-EventLog Cmdlet Syntax:

Remove-EventLog Cmdlet Argument List:

  • ComputerName: Specifies remote computers. The default is the local computer.
  • Confirm: Prompts you for confirmation before running the cmdlet.
  • LogName: Specifies the event logs. Enter the log name (the value of the Log property; not the LogDisplayName) of one or more event logs, separated by commas.
  • Source: Specifies the event sources that this cmdlet unregisters. Enter the source names, not the executable name, separated by commas.
  • WhatIf: Shows what would happen if the cmdlet runs. The cmdlet is not run.

PowerShell Remove-EventLog Cmdlet:

Hope you have enjoyed this article. In the next blog post, we will discuss New-PSSession CmdLet in PowerShell.

To Set more details on PowerShell, kindly follow below official documentation

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about?view=powershell-5.1

 

Leave a Reply