TestimoX

API Reference

Command

Set-CxEventLogPolicy

Namespace ComputerX.PowerShell
Inputs
System.String
Outputs
System.Boolean

Sets Event Log channel policy (enable/size/mode/path/SDDL) for a log.

Examples

Authored help example

Example 1


Set-CxEventLogPolicy -LogName Application -MaximumSizeMB 64 -Mode Circular
        

Example 2


Set-CxEventLogPolicy -ComputerName SRV1 -LogName Security -IsEnabled $true -MaximumSizeMB 256
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-CxEventLogPolicy [-ComputerName <string>] -LogName <string> [-IsEnabled <bool>] [-MaximumSizeMB <int>] [-Mode <string>] [-LogFilePath <string>] [-SecurityDescriptor <string>] [<CommonParameters>]
#

Parameters

ComputerName string optionalposition: 0pipeline: true (ByPropertyName)
Target computer(s). Use '.' for local computer or provide DNS names.
LogName string requiredposition: 1pipeline: false
Gets or sets the LogName parameter.
IsEnabled bool optionalposition: 2pipeline: false
Gets or sets the IsEnabled parameter.
MaximumSizeMB int optionalposition: 3pipeline: false
Gets or sets the MaximumSizeMB parameter.
Mode string optionalposition: 4pipeline: false
Gets or sets the Mode parameter.
LogFilePath string optionalposition: 5pipeline: false
Gets or sets the LogFilePath parameter.
SecurityDescriptor string optionalposition: 6pipeline: false
Gets or sets the SecurityDescriptor parameter.

Outputs

System.Boolean