tag:blogger.com,1999:blog-9038442616518901216.post2033163684359490601..comments2023-07-01T01:22:25.025+08:00Comments on SQL MAGÚ: Monitore o Event Viewer combinando o SQL + Powershell + Database Mail!André Rodrigueshttp://www.blogger.com/profile/00755834277976471963noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-9038442616518901216.post-82693922591254930582015-10-10T07:22:54.930+08:002015-10-10T07:22:54.930+08:00Hello Sharon! I tested the script and it works wel...Hello Sharon! I tested the script and it works well! If you want the sql file just send me an email =)<br /><br />Sorry about the late in the answer!<br /><br />Regards,<br /><br />AndréAndré Rodrigueshttps://www.blogger.com/profile/00755834277976471963noreply@blogger.comtag:blogger.com,1999:blog-9038442616518901216.post-73311171633708125962015-10-08T00:48:39.280+08:002015-10-08T00:48:39.280+08:00hi
I think there is a problem with the spaces.
can...hi<br />I think there is a problem with the spaces.<br />can you check it, or upload a script file?<br /><br /><br />powershell -command "$EventLog = Get-EventLog-Log System-after(Get-Date).AddDays(-1) | Select-Object EventID, TimeGenerated, Message, $list = @("55","1001","1006","1037","1038","1069","1074","1119","1127","1135","1146","1168","1172","1177","1183","1196","1205","1230","1564","6005","6006","6009","7024","7031","7034"); $events = @();. foreach ($event in $list) {$events += $EventLog | Where {$_eq $EventID event }} $events | Export-CSV c:\temp\erros.csv -noTypeInformation -ErrorAction SilentlyContinue<br />Sharon Rimerhttps://www.blogger.com/profile/02171563251146100825noreply@blogger.com