' Initialize the SMO object loSQLConnection = New SqlConnection(lcConnectionString) loServerConnection = New ServerConnection(loSQLConnection) loServer = New Server(loServerConnection) ' Execute the script loServer.ConnectionContext.ExecuteNonQuery(lcScript)Would there be a way to capture the output from the Messages tab, which is usually applicable when we execute the script in the SSMS?