Read the eventlog settings by using the following script.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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 |
wvsandwijk
I am a Technical Specialist - Cloud Infrastructures from the Netherlands.
My Skills are mainly PowerShell, VMWare, Hyper-V, Microsoft System Center products and Windows Azure Pack.
I work for a company in Utrecht The Netherlands.
My Skills are mainly PowerShell, VMWare, Hyper-V, Microsoft System Center products and Windows Azure Pack.
I work for a company in Utrecht The Netherlands.
Latest posts by wvsandwijk (see all)
- [PS] VMware ESX Certificate validation - September 7, 2018
- PoSH-Git : unable to start ssh-agent service, error :1058 - July 22, 2018
- [PS] Speedup VMWare PowerShell module - June 11, 2018