You are on page 1of 2

cd /d c:\temp

cluster res ACS_USA_SyslogAnalyser_0 /on


cluster res ACS_USA_SyslogAnalyser_1 /on
del "\\192.168.169.1\c$\acs\logs\USA\usa.tmp
del "\\192.168.169.2\c$\acs\logs\USA\usa.tmp

wmic path Win32_NTEventlogFile where LogfileName="Application" call ClearEventlog


wmic path Win32_NTEventlogFile where LogfileName="System" call ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="Directory Service" call
ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="DNS Server" call
ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="File Replication Service"
call ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="ISP" call ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="Security" call
ClearEventlog
wmic path Win32_NTEventLogFile GET LogfileName,NumberOfRecords

reg add "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\


Application" /v MaxSize /t REG_DWORD /d 4194304 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Directory Service"
/v MaxSize /t REG_DWORD /d 2097152 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\DNS Server"
/v MaxSize /t REG_DWORD /d 2097152 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\File Replication
Service" /v MaxSize /t REG_DWORD /d 2097152 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\ISP"
/v MaxSize /t REG_DWORD /d 2097152 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Security"
/v MaxSize /t REG_DWORD /d 8388608 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\System"
/v MaxSize /t REG_DWORD /d 4194304 /f

reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application"


/v MaxSize
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Directory Service"
/v MaxSize
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\DNS Server"
/v MaxSize
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\File Replication
Service" /v MaxSize
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\ISP"
/v MaxSize
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Security"
/v MaxSize
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\System"
/v MaxSize

wmic path Win32_NTEventlogFile where LogfileName="Application" call ClearEventlog


wmic path Win32_NTEventlogFile where LogfileName="System" call ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="Directory Service" call
ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="DNS Server" call
ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="File Replication Service"
call ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="ISP" call ClearEventlog
wmic path Win32_NTEventlogFile where LogfileName="Security" call
ClearEventlog
wmic path Win32_NTEventLogFile GET LogfileName,NumberOfRecords

You might also like