< Back

Enable-ChainsawCsv

Mon Jan 13, 2020 12:48 am

NAME Enable-ChainsawCsv



SYNOPSIS

This will allow you to enter values that bound to the CSV endpoint.





SYNTAX

Enable-ChainsawCsv [[-LogPath] <String>] [[-Levels] <String[]>] [[-MessageTemplate] <String>] [-ScopeGlobal]

[[-JsonConfig] <String>] [<CommonParameters>]





DESCRIPTION

In order to send to CSV, you need to make sure you have the following parameters filled.

[string] $LogPath

[string[]] $Levels

[string] $MessageTemplate





PARAMETERS

-LogPath <String>

[string] LogPath defines the location where the CSV entries will be written to.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Levels <String[]>

[string[]] This will define the events that it will monitor for. Enter the following values that are

predefined.

"Emergency"

"Alert"

"Critical"

"Error"

"Warning"

"Notice"

"Information"

"Debug"



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MessageTemplate <String>

[string] This defines the format of the message that will be displayed in. Use any of the following values in

a string to build the MessageTemplate.

#DateTime#

#Level#

#CallingFile#

#ErrorCode#

#LineNumber#

#Message#



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ScopeGlobal [<SwitchParameter>]

[switch] ScopeGlobal defines where to look for the Chainsaw Configuration.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-JsonConfig <String>

[string] This if filled will tell it where to look for an exported config file to reimport.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Enable-ChainsawCsv -LogPath '.\\log.csv' -Levels @("Emergency", "Alert", "Critical", "Error", "Warning",

"Notice", "Information", "Debug") -MessageTemplate "#DateTime#, #Level#, #CallingFile#, #ErrorCode#, #LineNumber#,

#Message#"



Enable-ChainsawCsv -JsonPath '.\\chainsaw.json'











RELATED LINKS