$Servers =
"Server01",
"Server02",
"Server03"
"Server01",
"Server02",
"Server03"
$today = get-date -Hour 0 -Minute 0;
$Servers|ForEach-Object{
Write-Host "Server: $_"
Get-EventLog system -ComputerName $_ -after $today | select -Property * |Where-Object{$_.EventID -eq 7031} | Export-Csv C:\Sumant\SystemEventDetails.csv -NoTypeInformation -Append
}
-------------------------------------- End --------------------------------------
No comments:
Post a Comment