dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaWindowsLog

Gets Windows Application events associated with an instance.

Screenshots

dbatools - Get-DbaWindowsLog

Examples

Returns all lines in the errorlogs that have event number 18456 in them

$ErrorLogs = Get-DbaWindowsLog -SqlInstance sql01\sharepoint
$ErrorLogs | Where-Object ErrorNumber -eq 18456

Author

This command was created by Drew Furgiuele.

Get-Help

From PowerShell, execute Get-Help Get-DbaWindowsLog -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaWindowsLog.ps1 on GitHub
 

Related commands