Считывание последних логов
$strLog = "application" $intNew = 50 Get-EventLog -LogName $strLog -newest $intNew
Для всех журналов -
$aryLogs = Get-EventLog -List
$intNew = 5
foreach ($strLog in $aryLogs)
{
Write-Host -ForegroundColor green `
"
$($strLog.log) Log Newest $intNew entries
"
Get-EventLog -LogName $strLog.log -newest $intNew
}
Голосов пока нет

Оставить комментарий