Get-SqlErrorLog

Returns the SQL Server Errorlog.

Syntax

Get-SqlErrorLog [-sqlserver] <Object> [[-lognumber] <Int32>] [<CommonParameters>]

Detailed Description

The Get-SqlErrorLog function returns the SQL Server Errorlog.

Related Commands

* Get-SqlErrorLog

Parameters

Name Description Required? Pipeline Input Default Value
sqlserver    true  false   
lognumber    false  false   

Input Type

None You cannot pipe objects to Get-SqlErrorLog

Return Values

System.Data.DataRow Get-SqlErrorLog returns an array of System.Data.DataRow.

Examples

EXAMPLE 1

Get-SqlErrorLog "Z002\sql2k8"
This command returns the current SQL ErrorLog on the Z002\sql2k8 server.