Gets the DBMail log from a SQL instance.
Returns the entire dbmail log on sql01\sharepoint.
Get-DbaDbMailLog -SqlInstance sql01\sharepoint
Returns the entire dbmail log on sql01\sharepoint then return a bunch more columns.
Get-DbaDbMailLog -SqlInstance sql01\sharepoint | Select *
Returns only the Error and Information dbmail log for “sql2014″,”sql2016” and “sqlcluster\sharepoint”.
$servers = “sql2014″,”sql2016”, “sqlcluster\sharepoint”
$servers | Get-DbaDbMailLog -Type Error, Information
This command was created by Chrissy LeMaire. You can find Chrissy on Twitter.