asked on
CLS
$a = Get-Date
$b = $a.AddHours(-1) #$a.AddDays(-1)
$Server = "ServerName"
Get-EventLog -ComputerName $Server -LogName Application -After $b -Before $a -Source "MSSQLSERVER" | ?{$_.EventID -eq 14151 }
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
2255302 Mar 22 10:39 Error MSSQLSERVER 3221239623 The description for Event ID '-1073727673' in Source 'MSSQLSERVER' cannot be found. The...
2255299 Mar 22 10:38 Error MSSQLSERVER 3221239623 The description for Event ID '-1073727673' in Source 'MSSQLSERVER' cannot be found. The...
2255298 Mar 22 10:38 Error MSSQLSERVER 3221239623 The description for Event ID '-1073727673' in Source 'MSSQLSERVER' cannot be found. The...
2255297 Mar 22 10:38 Error MSSQLSERVER 3221239623 The description for Event ID '-1073727673' in Source 'MSSQLSERVER' cannot be found. The...
2255296 Mar 22 10:37 Error MSSQLSERVER 3221239623 The description for Event ID '-1073727673' in Source 'MSSQLSERVER' cannot be found. The...
2255295 Mar 22 10:37 Error MSSQLSERVER 3221239623 The description for Event ID '-1073727673' in Source 'MSSQLSERVER' cannot be found. The...
2255294 Mar 22 10:37 Error MSSQLSERVER 3221239623 The description for Event ID '-1073727673' in Source 'MSSQLSERVER' cannot be found. The...