Set Maximum Event Log Size to 40MB for All Event Logs

PHOTO EMBED

Tue Jul 05 2022 10:24:20 GMT+0000 (Coordinated Universal Time)

Saved by @pepo72 #powershell

$logs = get-eventlog -list | foreach {$_.log}
foreach ($l in $logs) {
    limit-eventlog -logname $l -MaximumSize 40MB
}
get-eventlog -list
exit 0

content_copyCOPY