Telegram Group & Telegram Channel
Бэкап и очистка журналов Event Log в Windows, размер которых превышает определённое значение

Такой скрипт проверит размер файлов журнала (Event Log) и если обнаружит, что размер одного из них превышает указанное значение, то создаст его резервную копию, а затем очистит журнал.



strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Backup, Security)}!\\" _
& strComputer & "\root\cimv2")

Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")

For Each objLogfile in colLogFiles
If objLogFile.FileSize > 100000 Then
strBackupLog = objLogFile.BackupEventLog _
("c:\scripts\" & objLogFile.LogFileName & ".evt")
objLogFile.ClearEventLog()
End If
Next



tg-me.com/linux_srv/458
Create:
Last Update:

Бэкап и очистка журналов Event Log в Windows, размер которых превышает определённое значение

Такой скрипт проверит размер файлов журнала (Event Log) и если обнаружит, что размер одного из них превышает указанное значение, то создаст его резервную копию, а затем очистит журнал.



strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Backup, Security)}!\\" _
& strComputer & "\root\cimv2")

Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")

For Each objLogfile in colLogFiles
If objLogFile.FileSize > 100000 Then
strBackupLog = objLogFile.BackupEventLog _
("c:\scripts\" & objLogFile.LogFileName & ".evt")
objLogFile.ClearEventLog()
End If
Next

BY Типичный Сисадмин


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/linux_srv/458

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

Importantly, that investor viewpoint is not new. It cycles in when conditions are right (and vice versa). It also brings the ineffective warnings of an overpriced market with it.Looking toward a good 2022 stock market, there is no apparent reason to expect these issues to change.

telegram from hk


Telegram Типичный Сисадмин
FROM USA