Read the eventlog settings by using the following script.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer & "rootcimv2")
Set objInstalledLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")
WScript.Echo "Name|MaxSize|Overwrite"
For each objLogfile in objInstalledLogFiles
If objLogfile.OverWriteOutdated > 365 Then
strOverwriteOutdated = "Never"
ElseIf objLogfile.OverWriteOutdated = 0 Then
strOverwriteOutdated = "As needed"
Else
strOverwriteOutdated = objLogfile.OverWriteOutdated & " days"
End If
Wscript.Echo objLogfile.LogFileName & "|" & objLogfile.MaxFileSize & "|" & strOverwriteOutdated
Next


More Stories
Running PowerShell Hyper-V and VMWare Modules
PoSH-Git : unable to start ssh-agent service, error :1058
[PS] Speedup VMWare PowerShell module