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
- Event log channel name to update, such as Application or Security.
- IsEnabled bool
- Enables or disables the target event log channel.
- MaximumSizeMB int
- Maximum log size, in megabytes.
- Mode string
- Event log retention mode, such as Circular, Retain, or AutoBackup.
- LogFilePath string
- Optional file path for the physical event log file.
- SecurityDescriptor string
- Optional SDDL security descriptor to apply to the event log channel.
Outputs
System.Boolean