PowerShell Logo Small

New-WinEvent



This is the built-in help made by Microsoft for the command 'New-WinEvent', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a new Windows event for the specified event provider.

SYNTAX


New-WinEvent [-ProviderName] <String> [-Id] <Int32> [[-Payload] <Object[]>] [-Version <Byte>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-WinEvent cmdlet creates an Event Tracing for Windows (ETW) event for an event provider. You can use this cmdlet to add events to ETW channels from Windows PowerShell.





<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=289628
Get-WinEvent

REMARKS

<

Examples


Example 1

PS C:\>New-WinEvent -ProviderName Microsoft-Windows-PowerShell -Id 45090 -Payload @("Workflow", "Running")



This command uses the New-WinEvent cmdlet to create event 45090 for the Microsoft-Windows-PowerShell provider.