API Reference
Command
Set-CxEventLogPolicy
Sets Event Log channel policy (enable/size/mode/path/SDDL) for a log.
Examples
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
- Target computer(s). Use '.' for local computer or provide DNS names.
- LogName string
- Gets or sets the LogName parameter.
- IsEnabled bool
- Gets or sets the IsEnabled parameter.
- MaximumSizeMB int
- Gets or sets the MaximumSizeMB parameter.
- Mode string
- Gets or sets the Mode parameter.
- LogFilePath string
- Gets or sets the LogFilePath parameter.
- SecurityDescriptor string
- Gets or sets the SecurityDescriptor parameter.
Outputs
System.Boolean