Gets the history of mail sent from a SQL instance.
Returns the entire dbmail history on sql01\sharepoint.
Get-DbaDbMailHistory -SqlInstance sql01\sharepoint
Returns the entire dbmail history on sql01\sharepoint then return a bunch more columns.
Get-DbaDbMailHistory -SqlInstance sql01\sharepoint | Select *
Returns the all dbmail history for “sql2014″,”sql2016” and “sqlcluster\sharepoint”.
$servers = “sql2014″,”sql2016”, “sqlcluster\sharepoint”
$servers | Get-DbaDbMailHistory
This command was created by Chrissy LeMaire. You can find Chrissy on Twitter.